Search Results

Search found 1421 results on 57 pages for 'arbitrary'.

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

  • World orientation in OpenGLES clarification

    - by Dev2rights
    I have a 3d tile map made up of individual billboards in OpenGLES. Each is a 2 triangles mesh and has a 3D Vector to determine its position and another defining its rotation from the origin at (0,0,0). Im trying to work out how to rotate the entire tile map around a point be that the origin or some arbitrary point in space. Im guessing i need to set up a Model Matrix instead for each tile. Then set up a world matrix for the world. Then on updating i would translate the world matrix and change the orientation and multiply it with each model matrix before rendering. Is this correct ?

    Read the article

  • Driver inversion

    - by Val
    I have a GUI game, which is driven by user every time it clicks the mouse. Every time user clicks a square on a board, the board state is updated (we re-compute the score, the player to make next move and legal movements it can make) and repainted. Both mouse click, state recomputation and painting are handled in the GUI thread. Now, suppose that I want to train AI to play without GUI. That is, game engine should consume next move by simply calling AI's makeMove function in one thread. This would allow to play millions of games per second automatically. GUI may just screenshot some arbitrary states time after time. How do you switch to this strategy?

    Read the article

  • How to override filter in android's ArrayAdapter?

    - by Mike
    I have an ArrayAdapter wrapped around an ArrayList of custom objects. I'd like to write a custom filter for that adapter so that when I call getListAdapter().getFilter().filter("abc") the list will get filtered by an arbitrary transformation of "abc". I thought I would just try to override ArrayAdapter.getFilter(), but that requires I re-implement the private ArrayAdapter.ArrayFilter which requires access to a bunch of ArrayAdapter's private instances. What's the simplest way to do this?

    Read the article

  • JPQL IN clause: Java-Arrays (or Lists, Sets...)?

    - by Bernd Haug
    I would like to load all objects that have a textual tag set to any of a small but arbitrary number of values from our database. The logical way to go about this in SQL would be to build an "IN" clause. JPQL allows for IN, but it seems to require me to specify every single parameter to IN directly (as in, "in (:in1, :in2, :in3)"). Is there some way to specify an array, or a list (or some other container) that should be unrolled to the values of an IN clause?

    Read the article

  • Image rotation algorithm

    - by Stefano Driussi
    I'm looking for an algorithm that rotates an image by some degrees (input). public Image rotateImage(Image image, int degrees) (Image instances could be replaced with int[] containing each pixel RGB values, My problem is that i need to implement it for a JavaME MIDP 2.0 project so i must use code runnable on JVM prior to version 1.5 Can anyone help me out with this ? EDIT: I forgot to mention that i don't have SVG APIs available and that i need a method to rotate by arbitrary degree other than 90 - 180- 270 Also, no java.awt.* packages are available on MIDP 2.0

    Read the article

  • Eclipse PDT debugging web application: evaluating expressions in a console

    - by dreftymac
    When using Eclipse PDT with XDebug to debug a PHP web application, is there any way to open up a console window that will allow me to type in and see the value of arbitrary expressions in the current scope? This would seem like an obvious element of the debugging environment, and I may be missing something, but the only thing resembling a console says "no consoles to display at this time"

    Read the article

  • how to display HTML in a UITextView

    - by Mark
    essetially I just want formatted HTML rendered in the UITextView, should I be using the undocumented setContentToHTMLString? I feel that I should not be using that, I have tried it, but the text (after being rendered as HTML) does not scroll properly, which is why I suspect its not documented... Should I just use a UIWebView? Can I just pass it arbitrary HTML and expect it to render it?

    Read the article

  • qftp mput rawcommand

    - by krishna
    Hello, I have a doubt regarding multiple file transfer with qftp. There is no direct way to transfer multiple files with qftp class. Well, I tried it using arbitrary ftp command "mput" with "rawCommand" in QFTP. But it doesnt work for me. Please let me know how I could do a multiple file transfer with qftp. Thanks,

    Read the article

  • Exactly what is a "third party"? (And who are the first and second party?)

    - by aioobe
    I know precisely what a "third-party library" is, so I assume that the "third-party" in this case, simply is an arbitrary person/company other than the developer? Has it to do with "first person" / "second person" etc perhaps? The fact that there is a "third party" suggests that there is a "first party" and a "second party" as well. Are those terms well defined? (I'm not a native english speaker.)

    Read the article

  • Mimic Windows' 'Run' window in C#/.NET

    - by chaiguy
    I would like to mimic the Run command in Windows in my program. In other words, I would like to give the user the ability to "run" an arbitrary piece of text exactly as would happen if they typed it into the run box. While System.Diagnostics.Process.Start() gets me close, I can't seem to get certain things like environment variables such as %AppData% working. I just keep getting the message "Windows cannot find '%AppData%'..."

    Read the article

  • Is there an algorithm for converting quaternion rotations to Euler angle rotations?

    - by Will Baker
    Is there an existing algorithm for converting a quaternion representation of a rotation to an Euler angle representation? The rotation order for the Euler representation is known and can be any of the six permutations (i.e. xyz, xzy, yxz, yzx, zxy, zyx). I've seen algorithms for a fixed rotation order (usually the NASA heading, bank, roll convention) but not for arbitrary rotation order. Furthermore, because there are multiple Euler angle representations of a single orientation, this result is going to be ambiguous. This is acceptable (because the orientation is still valid, it just may not be the one the user is expecting to see), however it would be even better if there was an algorithm which took rotation limits (i.e. the number of degrees of freedom and the limits on each degree of freedom) into account and yielded the 'most sensible' Euler representation given those constraints. I have a feeling this problem (or something similar) may exist in the IK or rigid body dynamics domains. Solved: I just realised that it might not be clear that I solved this problem by following Ken Shoemake's algorithms from Graphics Gems. I did answer my own question at the time, but it occurs to me it may not be clear that I did so. See the answer, below, for more detail. Just to clarify - I know how to convert from a quaternion to the so-called 'Tait-Bryan' representation - what I was calling the 'NASA' convention. This is a rotation order (assuming the convention that the 'Z' axis is up) of zxy. I need an algorithm for all rotation orders. Possibly the solution, then, is to take the zxy order conversion and derive from it five other conversions for the other rotation orders. I guess I was hoping there was a more 'overarching' solution. In any case, I am surprised that I haven't been able to find existing solutions out there. In addition, and this perhaps should be a separate question altogether, any conversion (assuming a known rotation order, of course) is going to select one Euler representation, but there are in fact many. For example, given a rotation order of yxz, the two representations (0,0,180) and (180,180,0) are equivalent (and would yield the same quaternion). Is there a way to constrain the solution using limits on the degrees of freedom? Like you do in IK and rigid body dynamics? i.e. in the example above if there were only one degree of freedom about the Z axis then the second representation can be disregarded. I have tracked down one paper which could be an algorithm in this pdf but I must confess I find the logic and math a little hard to follow. Surely there are other solutions out there? Is arbitrary rotation order really so rare? Surely every major 3D package that allows skeletal animation together with quaternion interpolation (i.e. Maya, Max, Blender, etc) must have solved exactly this problem?

    Read the article

  • html widget communicating with server

    - by Nikita Rybak
    I'm making html widget for websites. Let's say, it will display current stock indexes. In short, arbitrary website owner takes code snippet from me and includes it on his webpage http://website.com/index.html. When arbitrary user opens http://website.com/index.html, my code sends request to my server (provider.com), which performs necessary operations and returns information to user's browser. When response has arrived, user will see relevant stock value on http://website.com/index.html. In index.html service could be called like this <script type="text/javascript" src="provider.com/service.js"> </script> <div id="target_area"></div> <script type="text/javascript"> service.show("target_area", options); </script> Now, the problem is in the same origin policy: I can't just send ajax request from website.com to provided.com and return html to embed in client's webpage. I see several solutions, which I list below, but none quite satisfy me. I wonder, if you could suggest something, especially if you had some relevant experience. 1) iframe, plain and simple. Disadvantage: must have fixed dimensions + stupid scroll bars appearing in some browsers. Can be fixed with javascript, but all this browser-specific tinkering doesn't sound good to me. 2) JSONP. Problem: can't return whole chunk of html, must return only data. Then, on browser side, I'll have to use javascript to embed data into html snippet placed statically in index.html. Doesn't sound nice, because data format is not very simple and may even change later. 3) Use hidden iframe to do ajax requests. A bit tricky, but sounds like a way to go. Well, that's my thoughts on the subject. Are there any better ways? BTW, I tried to check some existing widgets too, but didn't find much useful information. All domain names used in this text are fictional and any resemblance is purely coincidental :)

    Read the article

  • String chunking algorithm with natural language context

    - by Chris Ballance
    I have a arbitrarily large string of text from the user that needs to be split into 10k chunks (potentially adjustable value) and sent off to another system for processing. Chunks cannot be longer than 10k (or other arbitrary value) Text should be broken with natural language context in mind split on punctuation when possible split on spaces if no punction exists break a word as a last resort I'm trying not to re-invent the wheel with this, any suggestions before I roll this from scratch? Using C#.

    Read the article

  • How to determine a windows executables DLL dependencies programatically?

    - by Kelly
    Anybody know how to determine what DLL's a binary depends on using programmatic methods? To be clear, I am not trying to determine the DLL dependencies of the running exec, but of any arbitrary exec (that may be missing a required DLL). I'm looking for a solution to implement in a C/C++ application. This is something that needs to be done by my application at runtime and can't be done by a third party app (like depends). Thanks. -Kelly

    Read the article

  • advanced opensource iphone applications for developers

    - by Naveen
    The appstore does not allow your app out of a sandbox or allow it an interpreter. But is there any issue with distributing open source apps that run arbitrary code, and let iphone developers install them on their own development devices using xcode itself ? Also, is there anything you can not do with xcode that you may be able to do with ssh after jailbreaking ?

    Read the article

  • Is there any way to test server side code using JSTestDriver?

    - by dhackner
    I'm new to JS unit testing and I like what I've read about JSTestDriver. The idea of have the suite run every time you save is pretty cool. JSTestDriver runs Javascript in a browser sandbox and PHP runs on the server. If the browser slaves can serve from an arbitrary server is there any reason that you couldn't test it via AJAX? It this a misuse/misunderstanding of what the framework is for? Any clarifications are appreciated.

    Read the article

  • Dynamic JPA 2.0 query using Criteria API

    - by rrrrrrrrrrrrr
    Hello all, I am a bit stucked constructing a dynamic query using the CriteriaBuilder of JPA 2.0. I have quite a common use case I guess: User supplies a arbitrary amount of search parameters X to be and / or concatenated: like : select e from Foo where (name = X1 or name = X2 .. or name = Xn ) The Method or of CriteriaBuilder is not dynamic: Predicate or(Predicate... restrictions) Ideas? Samples?

    Read the article

  • How can I get a call stack listing in Perl?

    - by slashmais
    Is there a way I can access (for printout) a list of sub + module to arbitrary depth of sub-calls preceding a current position in a Perl script? I need to make changes to some Perl modules (.pm's). The workflow is initiated from a web-page thru a cgi-script, passing input through several modules/objects ending in the module where I need to use the data. Somewhere along the line the data got changed and I need to find out where.

    Read the article

  • Scala command line parameters in eclipse?

    - by Mitch Blevins
    Scala includes the continuations plugin now (yay), but must be enabled by passing "-P:continuations:enable" to the scala compiler. Is there a way to pass arbitrary arguments to scalac for the eclipse scala plugin? From: http://permalink.gmane.org/gmane.comp.lang.scala/19439 the plugin is loaded by default, but it must be enabled by the command line argument -P:continuations:enable

    Read the article

  • Tiling rectangles seamlessly in WPF

    - by Joe White
    I want to seamlessly tile a bunch of different-colored Rectangles in WPF. That is, I want to put a bunch of rectangles edge-to-edge, and not have gaps between them. If everything is aligned to pixels, this works fine. But I also want to support arbitrary zoom, and ideally, I don't want to use SnapsToDevicePixels (because it would compromise quality when the image is zoomed way out). But that means my Rectangles sometimes render with gaps. For example: <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Background="Black"> <Canvas SnapsToDevicePixels="False"> <Canvas.RenderTransform> <ScaleTransform ScaleX="0.5" ScaleY="0.5"/> </Canvas.RenderTransform> <Rectangle Canvas.Left="25" Width="100" Height="100" Fill="#CFC"/> <Rectangle Canvas.Left="125" Width="100" Height="100" Fill="#CCF"/> </Canvas> </Page> If the ScaleTransform's ScaleX is 1, then the Rectangles fit together seamlessly. When it's 0.5, there's a dark gray streak between them. I understand why -- the combined semi-transparent edge pixels don't combine to be 100% opaque. But I would like a way to fix it. I could always just make the Rectangles overlap, but I won't always know in advance what patterns they'll be in (this is for a game that will eventually support a map editor). Besides, this would cause artifacts around the overlap area when things were zoomed way in (unless I did bevel-cut angles on the underlapping portion, which is an awful lot of work, and still causes problems at corners). Is there some way I can combine these Rectangles into a single combined "shape" that does render without internal gaps? I've played around with GeometryDrawing, which does exactly that, but then I don't see a way to paint each RectangleGeometry with a different-colored brush. Are there any other ways to get shapes to tile seamlessly under an arbitrary transform, without resorting to SnapsToDevicePixels?

    Read the article

  • Query design in SQL - ORDER BY SUM() of field in rows which meet a certain condition

    - by Christian Mann
    OK, so I have two tables I'm working with - project and service, simplified thus: project ------- id PK name str service ------- project_id FK for project time_start int (timestamp) time_stop int (timestamp) One-to-Many relationship. Now, I want to return (preferably with one query) a list of an arbitrary number of projects, sorted by the total amount of time spent at them, which is found by SUM(time_stop) - SUM(time_start) WHERE project_id = something. So far, I have SELECT project.name FROM service LEFT JOIN project ON project.id = service.project_id LIMIT 100 but I cannot figure out how what to ORDER BY.

    Read the article

  • Rotate point in rectangle

    - by Dested
    I have a point in a rectangle that I need to rotate an arbitrary degree and find the x y of the point. How can I do this using javascript. Below the x,y would be something like 1,3 and after I pass 90 into the method it will return 3,1. |-------------| | * | | | | | |-------------| _____ | *| | | | | | | | | _____ |-------------| | | | | | *| |-------------| _____ | | | | | | | | |* | _____ Basically I am looking for the guts to this method function Rotate(pointX,pointY,rectWidth,rectHeight,angle){ /*magic*/ return {newX:x,newY:y}; }

    Read the article

  • Implementing PyMyType_Check methods with Python C API?

    - by Paul D.
    All the Python-provided types have a check method (i.e., PyList_Check) that allows you to check if an arbitrary PyObject* is actually a specific type. How can I implement this for my own types? I haven't found anything good online for this, though it seems like a pretty normal thing to want to do. Also, maybe I'm just terrible at looking through large source trees, but I cannot for the life of me find the implementation of PyList_Check or any of it's companions in the Python (2.5) source.

    Read the article

  • Dynamically expanding Django forms

    - by RexE
    I would like to create a form where a user can enter an arbitrary # of items in separate textboxes. The user could add (and potentially remove) fields as needed. Something like this: I found the following different solutions: http://www.eggdrop.ch/blog/2007/02/15/django-dynamicforms/ http://dewful.com/?p=100 Is there another best practice I might not be aware of?

    Read the article

  • Recommended Bean Utility Libraries for Java

    - by Jim Ferrans
    I'm looking for a good, well-supported, and efficient Java library that uses reflection to automate JavaBean operations. These include making a deep copy of an arbitrary bean hierarchy (with nested lists and maps of beans), comparing two bean hierarchies for deep equality, and "transmorphing" one bean to another of a different class. Some possibilities include Apache Commons BeanUtils, Spring's BeanUtils, and Java's Bean support. Which libraries would you recommend?

    Read the article

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