Search Results

Search found 864 results on 35 pages for 'transformation'.

Page 17/35 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Encode complex number as RGB pixel

    - by Vi
    How is it better to encode a complex number into RGB pixel and vice versa? Probably (logarithm of) an absolute value goes to brightness and an argument goes to hue. Desaturated pixes should receive randomized argument in reverse transformation. Something like: 0 - (0,0,0) 1 - (255,0,0) -1 - (0,255,255) 0.5 - (128,0,0) i - (255,255,0) -i - (255,0,255) (0,0,0) - 0 (255,255,255) - e^(i * random) (128,128,128) - 0.5 * e^(i *random) (0,128,128) - -0.5 Are there ready-made formulas for that?

    Read the article

  • SVG to Android Shape

    - by Buggieboy
    I have started learning about vector drawing in Android with the Shape class. Since Shape is a Drawable, and Drawables are usually defined as XML, it sounds a lot like the vector drawing commands in SVG. My question is this: Has anybody created an XSLT transformation, or other mechanism, for converting an SVG drawing description into Android Shapes?

    Read the article

  • Where to put a glossary of important terms and patterns in documentation?

    - by Tetha
    Greetings. I want to document certain patterns in the code in order to build up a consistent terminology (in order to easen communication about the software). I am, however, unsure, where to define the terms given. In order to get on the same level, an example: I have a code generator. This code generator receives a certain InputStructure from the Parser (yes, the name InputStructure might be less than ideal). This InputStructure is then transformed into various subsequent datastructures (like an abstract description of the validation process). Each of these datastructures can be either transformed into another value of the same datastructure or it can be transformed into the next datastructure. This should sound like Pipes and Filters to some degree. Given this, I call an operation which takes a datastructures and constructs a value of the same datastructure a transformation, while I call an operation which takes a datastructure and produces a different follow-up datastructure a derivation. The final step of deriving a string containing code is called emitting. (So, overall, the codegenerator takes the input-structure and transforms, transforms, derives, transforms, derives and finally emits). I think emphasizing these terms will be benefitial in communications, because then it is easy to talk about things. If you hear "transformation", you know "Ok, I only need to think about these two datastructures", if you hear "emitting", you know "Ok, I only need to know this datastructure and the target language.". However, where do I document these patterns? The current code base uses visitors and offers classes called like ValidatorTransformationBase<ResultType> (or InputStructureTransformationBase<ResultType>, and so one and so on). I do not really want to add the definition of such terms to the interfaces, because in that case, I'd have to repeat myself on each and every interface, which clearly violates DRY. I am considering to emphasize the distinction between Transformations and Derivations by adding further interfaces (I would have to think about a better name for the TransformationBase-classes, but then I could do thinks like ValidatorTransformation extends ValidatorTransformationBase<Validator>, or ValidatorDerivationFromInputStructure extends InputStructureTransformation<Validator>). I also think I should add a custom page to the doxygen documentation already existing, as in "Glossary" or "Architecture Principles", which contains such principles. The only disadvantage of this would be that a contributor will need to find this page in order to actually learn about this. Am I missing possibilities or am I judging something wrong here in your opinion? -- Regards, Tetha

    Read the article

  • ASP.NET, XSLT, extracting values from a CDATA section

    - by H4mm3rHead
    Hi,i have a small problem i have xome xml with a cdata section. This CDATA section contains fragments of HTMl. I would like to extract some of the data inside this CDATA element. Right now i have a XSLT transformation that outputs the rest of the document as HTMl, but i need only a small part of the CDATA HTML, not the entire part - e.g. a my Title tag. How to do this?

    Read the article

  • Is daisy chaining xslt an accepted practice?

    - by Stephen
    I have a situation where I think I need to daisy chain my xslt transformation (i.e. that output of one xslt transform being input into another). The first transform is rather complex with lots of xsl:choice and ancestor xpaths. My thought is to transform the xml into xml that can then be easily transformed to html. My question is 'Is this standard practice or am I missing something?' Thanks in advance. Stephen

    Read the article

  • Is it possible to convert text to shape in VML /canvas/SVG ?

    - by est
    Hello, I need to display a text in 3D using vml/canvas/svg and do some transformation to the shape of the text like the effect of Ctrl+T in photoshop, even align a line of text to a curve, is there a way to convert text to shape first? The only thing close is getImageData() in firefox which is not ideal but OK. Any better methods? Using browser-specific hacks or voodoo is OK, but no Flash please :)

    Read the article

  • Raphaeljs animation kills my browser

    - by user1688606
    I have this code where I have a made a character using 20 paths and put it into a set. Now when I animate the set, the first transformation runs smoothly, the second animation stutters, the third animation doesn't happen as it should and the 4th animation kills my pc, the browser hangs and in the task manager I can see that it consumes up to 70% of CPU. How can I avoid this and free the resources so all the animations run smoothly. *I have to execute 10 simple y-axis transformation animations on that character. JS Fiddle window.onload = function(){ var paper = Raphael(0,0,400,400); var character = paper.set(); paper.setStart(); var attr = {fill:'red',stroke:'none'}; var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var character = paper.setFinish(); character.transform("t0,200") //1st animation.. var chartrnsfrm = Raphael.animation({ transform:'...t0,-48' },1000,"easeout",function(){ character.animate(chartrnsfrm1.delay(2000)) }); character.animate(chartrnsfrm.delay(2000)); //2nd animation.. var chartrnsfrm1 = Raphael.animation({ transform:'...t0,-48' },1000,"easeout",function(){ character.animate(chartrnsfrm2.delay(2000)) }); //3rd animation.. var chartrnsfrm2 = Raphael.animation({ transform:'...t0,-48' },1000,"easeout",function(){ character.animate(chartrnsfrm3.delay(2000)) }); //4th animation.. var chartrnsfrm3 = Raphael.animation({ transform:'...t0,-48' },1000,"easeout"); }

    Read the article

  • Draw 2.5D or 3D Map with C# from lines.

    - by VOX
    I'm developing a turn-by-turn navigation software for Windows Mobile using C# and .NET CF. I'm able to draw a 2D maps by drawing lines. My problem is I would like to get a 2.5D map like in the picture. I tried non-affine transformation on the 2D rendered image but it is too slow for the Windows Mobile device we are targeting. Could anyone give me a clue on my problem? example image

    Read the article

  • programmatically updating iTunes track location

    - by Ben Clifford
    I would like to modify the filesystem path for tracks on itunes programmatically, so that I can apply a string transformation to some of the tracks locations (which are now stored in a different places on the filesystem). I've tried using AppleScript to update the location property of the relevant tracks but I get an end-of-file error when calling "set mytrack's location to ..." I've seen various other hacks online that involve exporting the entire track db, modifying it in XML, and then reimporting it - but that seems to lose too much metadata (such as playlists).

    Read the article

  • Using drawAtPoint with my CIImage not doing anything on screen

    - by Adam
    Stuck again. :( I have the following code crammed into a procedure invoked when I click on a button on my application main window. I'm just trying to tweak a CIIMage and then display the results. At this point I'm not even worried about exactly where / how to display it. I'm just trying to slam it up on the window to make sure my Transform worked. This code seems to work down through the drawAtPoint message. But I never see anything on the screen. What's wrong? Thanks. Also, as far as displaying it in a particular location on the window ... is the best technique to put a frame of some sort on the window, then get the coordinates of that frame and "draw into" that rectangle? Or use a specific control from IB? Or what? Thanks again. // earlier I initialize a NSImage from JPG file on disk. // then create NSBitmapImageRep from the NSImage. This all works fine. // then ... CIImage * inputCIimage = [[CIImage alloc] initWithBitmapImageRep:inputBitmap]; if (inputCIimage == Nil) NSLog(@"could not create CI Image"); else { NSLog (@"CI Image created. working on transform"); CIFilter *transform = [CIFilter filterWithName:@"CIAffineTransform"]; [transform setDefaults]; [transform setValue:inputCIimage forKey:@"inputImage"]; NSAffineTransform *affineTransform = [NSAffineTransform transform]; [affineTransform rotateByDegrees:3]; [transform setValue:affineTransform forKey:@"inputTransform"]; CIImage * myResult = [transform valueForKey:@"outputImage"]; if (myResult == Nil) NSLog(@"Transformation failed"); else { NSLog(@"Created transformation successfully ... now render it"); [myResult drawAtPoint: NSMakePoint ( 0,0 ) fromRect: NSMakeRect ( 0,0,128,128 ) operation: NSCompositeSourceOver fraction: 1.0]; //100% opaque [inputCIimage release]; } }

    Read the article

  • about TranslateTransform and RenderTransformOrigin

    - by George2
    Hello everyone, I am using Silverlight 3.0 + .Net 3.5 + VSTS 2008 + C# to silverlight application. I want to learn TranslateTransform and RenderTransformOrigin, could anyone recommend me some tutorials? I am a newbie of this area. And I did not find anything which is good to learn for a newbie from MSDN (correct me if there are some good stuff). :-) BTW: I am headache about the coordination transformation matrix, it is great if the tutorial could cover this topic. thanks in advance, George

    Read the article

  • Expandable list with animated effect

    - by Naveen Chauhan
    I am using this animation class to create the animation when i shrink and expand the list on some click event import android.view.View; import android.view.animation.Animation; import android.view.animation.Transformation; import android.widget.LinearLayout.LayoutParams; public class ExpandAnimation extends Animation{ private View mAnimatedView; private LayoutParams mViewLayoutParams; private int mMarginStart, mMarginEnd; private boolean mIsVisibleAfter = false; private boolean mWasEndedAlready = false; public ExpandAnimation(View view, int duration){ setDuration(duration); mAnimatedView = view; System.out.println(view.getVisibility()); mViewLayoutParams = (LayoutParams)view.getLayoutParams(); mIsVisibleAfter = (view.getVisibility() == View.VISIBLE); System.out.println("mIsVisibleAfter:- "+ mIsVisibleAfter); mMarginStart = mViewLayoutParams.bottomMargin; System.out.println("mMarginStart:- "+ mMarginStart); mMarginEnd = (mMarginStart == 0 ?(0 - view.getHeight()):0); System.out.println("mMarginEnd:- "+mMarginEnd); view.setVisibility(View.VISIBLE); } @Override protected void applyTransformation(float interpolatedTime, Transformation t){ super.applyTransformation(interpolatedTime, t); System.out.println("mMarginEnd:- "+interpolatedTime); if(interpolatedTime<1.0f){ System.out.println("Inside if true"); mViewLayoutParams.bottomMargin = mMarginStart + (int) ((mMarginEnd - mMarginStart)*interpolatedTime); System.out.println("mViewLayoutParams.bottomMargin:- "+mViewLayoutParams.bottomMargin); mAnimatedView.requestLayout(); }else if(!mWasEndedAlready){ mViewLayoutParams.bottomMargin = mMarginEnd; mAnimatedView.requestLayout(); System.out.println("mIsVisibleAfter:- "+mIsVisibleAfter); if(mIsVisibleAfter){ mAnimatedView.setVisibility(View.GONE); } mWasEndedAlready = true; } } } i am using following lines on some click event in my activity class to create the object of my animation class View toolbar = (View) findViewById(R.id.toolbar1); ExpandAnimation expandani = new ExpandAnimation(toolbar,500); toolbar.startAnimation(expandani); My probem is that when click event occurs, my list expand and then shrink but it must stop when it grows completely and shrink when i click on up image. please let me know that how my animation class is working. i have also tried myself by using SOP statements which you can see in my animation class.

    Read the article

  • VS 2010 Web.config transformations for debugging

    - by Dirk
    I’m a fan of the new VS 2010 Web.config transformations. I use this feature for deployment purposes and wondered if it is possible to use them for debugging too. I think of using them in the IDE: I want to create different built configuration (with linked transformation configurations); choose one of them; start the web site in the IDE and debug the different configuration this way.

    Read the article

  • .NET Extension Objects with XSLT -- how to iterate over a collection?

    - by Pandincus
    Help me, Stackoverflow! I have a simple .NET 3.5 console app that reads some data and sends emails. I'm representing the email format in an XSLT stylesheet so that we can easily change the wording of the email without needing to recompile the app. We're using Extension Objects to pass data to the XSLT when we apply the transformation: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl" xmlns:EmailNotification="ext:EmailNotification"> -- this way, we can have statements like: <p> Dear <xsl:value-of select="EmailNotification:get_FullName()" />: </p> The above works fine. I pass the object via code like this (some irrelevant code omitted for brevity): // purely an example structure public struct EmailNotification { public string FullName { get; set; } } // Somewhere in some method ... var notification = new Notification("John Smith"); // ... XsltArgumentList xslArgs = new XsltArgumentList(); xslArgs.AddExtensionObject("ext:EmailNotification", notification); // ... // The part where it breaks! (This is where we do the transformation) xslt.Transform(fakeXMLDocument.CreateNavigator(), xslArgs, XmlWriter.Create(transformedXMLString)); So, all of the above code works. However, I wanted to get a little fancy (always my downfall) and pass a collection, so that I could do something like this: <p>The following accounts need to be verified:</p> <xsl:for-each select="EmailNotification:get_SomeCollection()"> <ul> <li> <xsl:value-of select="@SomeAttribute" /> </li> </ul> <xsl:for-each> When I pass the collection in the extension object and attempt to transform, I get the following error: "Extension function parameters or return values which have Clr type 'String[]' are not supported." or List, or IEnumerable, or whatever I try to pass in. So, my questions are: How can I pass in a collection to my XSLT? What do I put for the xsl:value-of select="" inside the xsl:for-each ? Is what I am trying to do impossible?

    Read the article

  • Align 2 sets of 2D point clouds

    - by user108088
    From what I gather, there are two major methods to perform alignment on point clouds, Iterative Closest Point (ICP) and Particle Filtering. What are the advantages of each method? And can someone point me some good tutorials. For what I am currently doing, I think ICP would be easier, I can't seem to find any simple reference implementations online for 2d point sets. Has anyone seen (psuedo)code for ICP with details on the transformation step? Thanks in advance.

    Read the article

  • How to view doctype in generated source code

    - by wcpro
    I am using an XSL transformation on an xml file to create an xml document. The problem i am running into is that when i go to view the generated source (the transformed source) i can't see the DOCTYPE attribute of the html so i don't know if its being emitted properly. Is there any way to view the doctype in this way?

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >