Questions tagged [transform]

0

votes
0

answer
17

Views

Use macro to copy & transform data

I'm trying to copy data from a pivot table to another location such that the data in in columnar form where each 'account number' is tied to its 'cost center' and its associated 'amount.' The image below shows visually what I'm trying to achieve. I've used the 'record macro' feature and it works. H...
Aaron
1

votes
1

answer
46

Views

How to transform a String to a Date JavaScript?

I have the following line 20190304 And I need to get a date from this format 20190304. So I have this code to accomplish my goal: var str = '20190304'; var date = Date.parse(str.substring(0,4) + '-' + str.substring(4,6) + '-' + str.substring(6,8)); var date2 = new Date(date) console.log(date2); Res...
Millet Antoine
0

votes
0

answer
8

Views

Getting a local position of a transform movment

Let's say I have object A nested in B. I can get a local position of A in the coordination system of B by calling A.transform.localPosition. If I move the object A using A.tranform.translate( new Vector3(0,1,0) ), the object A will move to its y position. In this case, how can I know this resulting...
noclew
0

votes
1

answer
24

Views

Changing css transform in javascript doesn't trigger transition in Javascript

I want to program a responsive navigation bar, so when the user clicks on the burger menu, the links of the navigation should move from right to left inside the website. In Javascript I toggle the class 'nav-active' of 'nav ul'. The 'nav-active' class has the attribute 'transform: translateX(0%);',...
wjatscheslaw
0

votes
0

answer
2

Views

Pandas: Grouped DataFrame - divide values of a column by the value of a certain row within that column for each group

I have a dataframe with groups. To normalize the values for each group I'd like to divide all values of each group by the value of a certain element within that group. df = pd.DataFrame([['a','2018-02-03',42], ['a','2018-02-04',22], ['a','2018-02-05',10], ['a','2018-02-06',32], ['b','2018-02-03',10...
FreezeFrame
1

votes
2

answer
1.3k

Views

Mouse coordinate based perspective rotation with centered div [Javascript]

Second question I've asked, so if I need to add anything else, let me know please! Been looking everywhere to try and understand concepts, but I feel like I am over thinking it. What I am trying to do is base 'transform: rotateX('x'deg)' off of the x location of the users cursor proportionately fr...
bnned
1

votes
1

answer
3k

Views

Pad a Tensor in Torch

I have a 100x100 pixel image in a Torch Tensor and I want to implement a 'zoom out' transformation. How can I achieve this using the Torch Image toolbox (or other)? I have already implemented 'zoom in' by simply using image.crop followed by image.resize. In Matlab, I would calculate the mean grays...
Chris Parry
1

votes
1

answer
271

Views

How do prevent Inkscape from adding transforms when exporting SVGs?

I'm working with Inkscape on some SVG icons, and every time I create a new icon, Inkscape applies transform=translate(...) on the image. This moves the image from its' X=0,Y=0 to some awkward coordinates. I found an answer, on how to eliminate the transforms, manually, on this thread, but I need t...
Adrian Oprea
1

votes
1

answer
251

Views

stationary vs. undecimated wavelet transform

I have a little bit confused on the difference between stationary wavelet transform and un-decimated wavelet transform. So, can anyone tell me, if there is a difference between them?
Serwan Bamerni
1

votes
1

answer
761

Views

Why does an Affine rotation in 90/270 degrees not preserve correct dimensions, but instead re-sizes width and height to the same pixel size?

What I'm trying to do: I am looking to transform an image by rotating it by either 90, 180, or 270 degrees. What's happening: For some reason when I am rotating a 640x360 pixel image, 90 degrees, I end up getting a 500x500 image, instead of a 360x640 image, so the image gets re-sized for some reason...
XaolingBao
1

votes
3

answer
96

Views

Converting columns into rows in r [duplicate]

This question already has an answer here: Reshaping multiple sets of measurement columns (wide format) into single columns (long format) 6 answers I have the below data formed using code test
syebill
1

votes
1

answer
189

Views

WiX XSLT transform messing up my formatting

I'm trying to use a transform to add an attribute to a Component description. It is adding the attribute properly but messes up my XML formatting. My goal is to add the attribute 'Permanent='yes' ' to the Component. The XSLT is: yes The .wxl file before transform looks like this: and after the tr...
gagidlof
1

votes
1

answer
449

Views

Unity3D MultiplyPoint matrix confusion

This multiply point function simply multiplies up to a 4*4 matrix by a vector 3 or 4. I am trying to replicate this function using only maths as I'm using shaders. The maths itself is nothing spectacular, just the dot product of each column by each row to get the resulting transform. My problem is t...
Jamie Nicholl-Shelley
1

votes
1

answer
125

Views

XML transformation not working

I have installed the SlowCheetah extension and Nuget Package into my Console App Project. I have used the context menu to add a UAT build configuration and updated a test setting to check that the value is being transformed. Unfortunately its not, when I try to Preview the Transform via the Context...
Tom McClean
1

votes
1

answer
102

Views

Translating SVG text in css - why do my text boxes move from the origin instead of their starting location?

So, I have a little hover animation I am doing. But I am having some issues with using 'transform: translate'. I want my letters to move from location 1 to location 2, with a translate and have a transition set so they appear animated. The good news is that the letters actually end up where I wan...
CoderScissorhands
1

votes
1

answer
36

Views

Regrouping data based on an indicator value

I have a dataframe with two columns as shown below, Name Indicator DeAngelo Williams 1 Marcus Brown 1 Elaine Nelson 2 Steve Olson 3 Jennifer Carter 1 Michael Johnson 2 Angela Brawley 3 Dax Shepard 4 What I am trying to do is combine all the...
King Frazier
1

votes
1

answer
1.2k

Views

CSS 3D isometric simple rotation transform

I am trying to do a small CSS animation with a door like folding animation. I use a SVG as the base, gave it an isometric transform and now I would like the orange square to fold as if it was a 3D space. I tried to play with perspective, skewing, transform 3D but failed. #svgbox { position: absolut...
coulix
1

votes
2

answer
67

Views

Do web transforms published to production pose a security risk

Our asp mvc is published automatically using octopus deploy. We use web config transformations and we always end up with additional environment specific files in the installation folder. Eg Web.development.config Web.test.config Web.preprod.config There is a slight advantage in having these files de...
Kye
1

votes
2

answer
241

Views

Detecting centers of circles from camera images

So I'm developing an Ionic app that uses the phone camera to detect circles on fabric, like the picture below: Where the max size is a 3x3 grid and there are 4 different colors (lightblue, darkblue, lightgreen and darkgreen). Basically, I've broken the problem down into 3 steps: Get the center of ea...
Turner Houghton
1

votes
1

answer
723

Views

Blurred text *during* css transform - Chrome

Hello I've been fighting with this for a while. I have a button (happens even with a div w/ text inside) that I'm trying to transform just slightly. During the transform the text shows blurry then kind of pops back into focus. Is there any way to just have the text stay the same size?? Or have it re...
ganjeii
1

votes
1

answer
680

Views

CSS: Absolute(?) positioning skewed element (no JS !important)

Is it possible to absolute position skewed element so its left-bottom corner stay close (0px) to container's border? #one{ position:absolute; background-color:darkkhaki; width:800px; height:200px; left:50%; transform: translateX(-50%) } #rect{ position:absolute; background-color: salmon;...
oboer
1

votes
1

answer
103

Views

Converting from group by output to separate columns in pandas

I have a grouped by pandas dataframe that looks like so: id type count 1 A 4 1 B 5 2 A 3 3 C 0 3 B 6 and I am hoping to get an output: id A B C 1 4 5 0 2 3 0 0 3 0 0 6 I feel like there is a straightforward solution to this that I am not seeing.
SteelyDanish
1

votes
1

answer
614

Views

Swift - Rotate an image, then zoom in and crop to keep width/height aspect ratio intact

If the title isn't clear, open Photos app on your iPhone and edit a picture. Try the rotation tool. The frame don't rotate, only the image does and zoom in to stay in the frame. Here is a picture of this: I would like to copy this comportment in my Swift project. It means rotating an image (it can b...
Moon
1

votes
2

answer
87

Views

Add more degrees everytime you click

I want to add more degrees of rotation to #rad-spin every time someone clicks on #rad-btn $(document).ready(function(){ $('#rad-btn').click(function(){ $('#rad-spin').css('transform', 'rotate(90deg)'); }); }); Now it just goes one time to 90deg and if I click again it won't go further to 180deg (obv...
user3124133
1

votes
1

answer
264

Views

dynamically add a value will-change on click/hover jQuery

In this article, the author states do not need permanently store style will-change css style file will-change: transform;, and should be added dynamically using javascript Аlso the author the example script: var el = document.getElementById('element'); // Set will-change when the element is hovered...
Osadchiy Yuriy
1

votes
2

answer
677

Views

Wix Instance Transform Dynamic ProductName and Id

I have a Wix wxs file where i have configured to have multiple instance using Instance Transform. And i install by executing the following command, msiexec INSTALLLOCATION='D:\Wixtestinstance\1' /i WixSetupWPFApp.msi MSINEWINSTANCE=1 TRANSFORMS=':I01' How can i generate the Instance Dynamically thro...
Vinay
1

votes
1

answer
274

Views

MATLAB: can't get houghlines to detect even a simple line?

I'm learning how hough and houghlines work in MATLAB but I can't seem to make the example code found in the function's documentation to behave correctly even for a simple line I drew in Paint. Here's the code that I'm using: clear all; clc; close all I = imread('lines2.png'); BW = im2bw(I); [H,T,R]...
yuyu2809
1

votes
1

answer
68

Views

How to re-construct an image with just the horizontal co-efficient of wavelet transform?

I am trying to reconstruct the input image with just the horizontal coefficients of the stationary wavelet transform. [A,H,V,D ] = swt2(x,1,'sym4'); A = 0; V = 0; D = 0; %i am setting other co-efficents to zero since i am only intersted in the values of H % Y = iswt2(A,H,V,D,'sym4') ; %this gives th...
Jne_098
1

votes
2

answer
308

Views

How can I transform 3 objects to swap positions, but make sure they aren't moving to a position an object is already going to?

I have applied a code to 3 objects. So far this code switches three cups around so that they swap places. The code gets the start position of the cup, and then the end position of each cup. All 3 end positions are actually the start positions of the other cups, since I want them to swap to the same...
Nicole Pinto
1

votes
2

answer
91

Views

css3 3D transform

I have a triangle and I need it to rotate 360 deg around the bottom left triangle angle. I need this point to be fixed and just the triangle rotate around it. here's my code figure { background-color:#000; position: relative; overflow:hidden; margin: 20px 1%; height: 200px; text-align: center;...
Yahya Essam
1

votes
1

answer
1.1k

Views

XDT Transform of web.config is Append possible

I'm trying to update an existing appSettings in my web.config. I don't want to replace the entire value, but append my new value to the end. Is this possible? Current value: Required value: This is what I have currently in my transform file:
Ian Houghton
1

votes
1

answer
275

Views

How to copy child element n times in XML file using XSLT

I am very new to XSLT. I need to transform and copy child nodes 1000 times and also increment the id node so that they are different each time. Input XML: 2017 Bob Dylan USA Columbia 10.90 1985 My XSLT: but it only copies once What I need is: Please help 2017 Bob Dylan USA Columbia 10.90 1985 2018...
hln98
1

votes
1

answer
72

Views

Transforming data frame using column name

This is following on from another question Extracting from Nested list to data frame Using the updated answer I get my data frame I will start with. I then use df
Olivia
1

votes
1

answer
152

Views

Opengl Transform feedback made correctly on Android

I have been struggling to create a working transform feedback on android. So far, the closest I have gotten had a similar issue to this downvoted question: https://stackoverflow.com/questions/41066101/transform-feedback-altering-render-result What I want to create: Render from a vertex buffer object...
andras
1

votes
2

answer
134

Views

Zingchart plotting X-axis with Times, not Dates

I want to plot data with my X-axis representing Timespans (elapsed times), not actual dates. I have a series with the following (string) values: times: '00:00:00', '00:01:00', '00:10:00', '00:11:00' I parse these values into (int) times: 0, 6000, 60000, 66000 But when I draw the graph, the hour fiel...
corentinaltepe
1

votes
2

answer
244

Views

transform_keys for an array of hashes

I have the following array of hashes and I want to use transform_keys to strip the beginning of each key using a regex: array_of_hashes = [{'a_0_abc'=>'1', 'a_0_def'=>'1', 'a_0_hij'=>'1',}, {'a_1_abc”=>'2', 'a_1_def'=>'2', 'a_1_hij'=>'2'}] and I want the following: transformed_hash_keys...
Munchies
1

votes
1

answer
477

Views

How can I rotate image with Fresco Image Viewer library?

I use fresco image viewer library in my app and everything works prefect but I have a problem with rotating image. by default this library can rotate image automatically when the device screen rotation is on but I don't want to use that way. actually I want to know how can I rotate it by touch or bu...
arman
1

votes
1

answer
254

Views

@Keyframes to scale transform site body

How can I use @keyframes to scale transform (enlarge) all content in my HTML tags? Is there a way to use Keyframes instead of my temporary solution of body:hover? The body should be scaled by 1.01 over a period of 1.5s as the website page is first loaded. body { transition: all 1.5s ease-in-out; t...
LFJ__
1

votes
1

answer
113

Views

Filtering through Hough transform results in DLIB

I am trying to use Hough transform from DLIB but can't get more than one line to show. The example in DLIB docs use just one, strong point: point p = max_point(mat(himg)); How can I get all strong (above certain threshold or N most votes) lines to show? I've tried to loop through the points and mask...
user3002166
1

votes
3

answer
1k

Views

pywavelet signal reconstruction

I am trying to understand the concept of wavelets using the pywavelet library. My first step was to see how I could reconstruct a given input signal using the wavelet coefficients. Please see my code below: db1 = pywt.Wavelet('db1') cA6, cD6,cD5, cD4, cD3, cD2, cD1=pywt.wavedec(data, db1, level=6) c...
user1274878

View additional questions