Search Results

Search found 2509 results on 101 pages for 'converting'.

Page 20/101 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • Converting JBOSS annotations to xml

    - by sixtyfootersdude
    Good Morning, I was just hoping that someone could point me to a reference that defines about what JBOSS annotations are equivalent to what xml tags. I am particularly interested in these tags: @WebContext in org.jboss.ws.annotation.WebContext and @SecurityDomain in org.jboss.annotation.security.SecurityDomain

    Read the article

  • Converting OpenGL co-ordinates to lower UIView (and UIImagePickerController)

    - by John Qualis
    Hi, I am new to OpenGL over iPhone. I am developing an iPhone app similar to a barcode reader but with an extra OpenGL layer. The bottommost layer is UIImagePickerController, then I use UIView on top and draw a rectangle at certain co-ordinates on the iphone screen. So far everything is OK. Then I am trying to draw an OpenGL 3-D model in that rectangle. I am able to load a 3-D model in the iPhone based on this code here - http://iphonedevelopment.blogspot.com/2008/12/start-of-wavefront-obj-file-loader.html I am not able to transform the co-ordinates of the rectangle into OpenGL co-ordinates. Appreciate any help. Do I need to use a matrix to translate the currentPosition of the 3-D model so it is drawn within myRect? The code is given below.. Appreciate any help/pointers in this regards. John -(void)setupView:(GLView*)view { const GLfloat zNear = 0.01, zFar = 1000.0, fieldOfView = 45.0; GLfloat size; glEnable(GL_DEPTH_TEST); glMatrixMode(GL_PROJECTION); size = zNear * tanf(DEGREES_TO_RADIANS(fieldOfView) / 2.0); CGRect rect = view.bounds; glFrustumf(-size, size, -size / (rect.size.width / rect.size.height), size / (rect.size.width / rect.size.height), zNear, zFar); glViewport(0, 0, rect.size.width, rect.size.height); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); NSString *path = [[NSBundle mainBundle] pathForResource:@"plane" ofType:@"obj"]; OpenGLWaveFrontObject *theObject = [[OpenGLWaveFrontObject alloc] initWithPath:path]; Vertex3D position; position.z = -8.0; position.y = 3.0; position.x = 2.0; theObject.currentPosition = position; self.plane = theObject; [theObject release]; } (void)drawView:(GLView*)view; { static GLfloat rotation = 0.0; glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); glColor4f(0.0, 0.5, 1.0, 1.0); // the coordinates of the rectangle are // myRect.x, myRect.y, myRect.width, myRect.height // Do I need to use a matrix to translate the currentPosition of the // 3-D model so it is drawn within myRect? //glOrthof(-160.0f, 160.0f, -240.0f, 240.0f, -1.0f, 1.0f); [plane drawSelf]; }

    Read the article

  • Struts2 Converting Enum Array fills array with single null value

    - by Kyle Partridge
    For a simple action class with these member variables: ... private TestConverterEnum test; private TestConverterEnum[] tests; private List<TestConverterEnum> tList; ... And a simple enum: public enum TestConverterEnum { A, B, C; } Using the default struts2 enum conversion, when I send the request like so: TestConterter.action?test=&tests=&tList=&b=asdf For test I get a null value, which is expected. For the Array and List, however, I get and Array (or list) with one null element. Is this what is expected? Is there a way to prevent this. We recently upgraded our struts2 version, and we had our own converters, which also don't work in this case, so I was hoping to use the default conversion method. We already have code that is validating these arrays for null and length, and I don't want to have to add another condition to these branches. Is there a way to prevent this bevavior?

    Read the article

  • Uncaught TypeError: Converting circular structure to JSON

    - by ychia
    We're using the fb:registration plugin to sign up users on our site. Today I noticed the registration redirect is no longer working in Google Chrome and Safari (latest public release). I know for sure it was working with the same code as recently as last week. It seems to be getting stuck on submission with this error, which is coming from: static.ak.fbcdn.net/rsrc.php/v1/ys/r/ioE9qOq_5Oa.js:101 Firefox and IE have no problem, so it seems to be Webkit specific. Any ideas?

    Read the article

  • Problem Converting Web To Web Project In VS2008

    - by leen3o
    I have converted my old VS2008 Website to Web Application, now everything was working before I tried to convert it. But now I don't seem to be able to reference my Classes? For example I have a BasePage class that every .aspx page inherits like so public partial class SomePageName : BasePage { } But now I get this message? And the same for all the other classes? The type or namespace name 'BasePage' could not be found (are you missing a using directive or an assembly reference?) How do I find out which 'using' directive I am missing and whats an assembly reference?

    Read the article

  • ARM Assembly - Converting Endianness

    - by SoulBeaver
    Hello people! This is currently a homework project that me and my teammate are stuck on. We haven't been given much of an introduction into Assembly, and this is supposed to be our first homework exercise. The task is to create a program that converts 0xAABBCCDD into 0xDDCCBBAA. I'm not looking for an answer, as that would defeat the purpose, but we are getting severely frustrated over the difficulty of this stupid thing. We think we have a good start in creating a viable solution, but we just cannot come up with the rest of the program. First, we mask every single tupel (aa), (bb), (cc), (dd) into a different register: LDR R0, LittleEndian // 0xAABBCCDD AND R1, R0, #0xFF000000 // 0xAA AND R2, R0, #0x00FF0000 // 0xBB AND R3, R0, #0x0000FF00 // 0xCC AND R4, R0, #0x000000FF // 0xDD Then we try to re-align them into the R0 register, but hell if we could come up with a good solution... Our best effort came from: ORR R0, R1, LSL #24 ORR R0, R2, LSL #8 ORR R0, R3, LSR #8 ORR R0, R4, LSR #24 which produced 0xBBBBCCDD for some odd reason; we really don't know. Any hints would be greatly appreciated. Again, we are asking for help, but not for a solution. Cheers!

    Read the article

  • Converting a String to Color in Java

    - by devoured elysium
    In .NET you can achieve something like this: Color yellowColor = Color.FromName("yellow"); Is there a way of doing this in Java without having to resort to reflection? PS: I am not asking for alternative ways of storing/loading colors. I just want to know wherever it is possible to do this or not.

    Read the article

  • Converting MS Word Documents to PDF in ASP.NET

    - by glaxaco
    Similar questions have been asked, but nothing exactly like mine, so here goes. We have a collection of Microsoft Word documents on an ASP.NET web server with merge fields whose values are filled in as a result of user form submissions. After the field merge, the server must convert the document to PDF and stream it down to the browser. Our first inclination was to use the Visual Studio Tools for Office API; however, we ran into this warning from Microsoft: Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment. It looks like the field manipulation can be done using the Open XML SDK, but what's the best way to convert Word 2007 documents to PDF without opening Word? The optimal solution would be low-cost, scalable, have a low memory footprint, be easy to deploy, and have a .NET API.

    Read the article

  • Converting HTML TAG Object to JSON Object

    - by cooldude
    Hi, I want to convert the html tag objects to json object in the javascript in order to send them to the server from the javascript. As i have to save these objects at the Ruby on Rails server. These HTML objects is the canvas tag object and the graphics objects created using CAKE API. I have used the stringify function but it is not working. Here is my code: var CAKECanvas = new Canvas(document.body, 1000,1000); var canvas=CAKECanvas.canvas; var text=document.createElement('textarea'); text.id="text"; text.rows="100"; text.cols="200"; document.body.appendChild(text); canvas.style.borderStyle="solid"; canvas.style.borderColor="black"; var rect= new Circle(); rect.radius=100; rect.centered=true; rect.cx=Math.random() * 500; rect.cy= Math.random() * 300; rect.stroke= false; rect.fill= "red"; rect.xDir = Math.random() > 0.5?1:-1; rect.yDir = Math.random() > 0.5?1:-1; var obj=new Object; var count = 0,k; for (k in rect) { if (rect.hasOwnProperty(k)) { count++; obj[k]=rect[k]; } } alert(count); rect.addFrameListener(function(t, dt) { this.cx += this.xDir * 50 * dt/1000; this.cy += this.yDir * 50 * dt/1000; if (this.cx > 550) { this.xDir = -1; } if (this.cx < 50) { this.xDir = 1; } if (this.cy > 350) { this.yDir = -1; } if (this.cy < 50) { this.yDir = 1; } } ); CAKECanvas.append(rect); var carAsJSON = JSON.stringify(obj); /////////////////ERROR

    Read the article

  • Best cheap GUI for converting to f4v

    - by Ben
    Hi, I need to give one client the ability to convert some videos to f4v h264 before loading it up to an AIR app. I normally doing with the Adobe Media Encoder CS4 but that only ships with adobe products (you can't download it as a free standalone app - which, start rant is odd, you'd think they would push the format - Microsoft's competing expresssion encoder is free end rant) Anyway, I need to get a (hopefully not too expensive, but willing to pay for it) good 3rd part app that can take any video and convert it to an f4v. Can you suggest any? Everything i've found is horrible or jammed with ads and crap. What would you use? Any suggestion? (please don't just say ffmpeg - I know it can do it but we need to good simple GUI) Thanks!

    Read the article

  • Converting back from toString to Object

    - by MontyBongo
    Is there any way to covert from toString back to the object in Java? For example: Map<String, String> myMap = new HashMap<String, String>(); myMap.put("value1", "test1"); myMap.put("value2", "test2"); String str = myMap.toString(); Is there any way to convert this String back to the Map?

    Read the article

  • parser error in aspx page(.net 2.0) after converting from website to web application

    - by persistence911
    I have a website I recently converted from website to web application Project . When I compile It compiles Successfuly but when I run the code I get this error Parser Error Message: Could not load type 'DApplause.Logon'. Source Error: Line 1: <%@ Page Language="vb" AutoEventWireup="true" CodeBehind ="Logon.aspx.vb" inherits="DApplause.Logon"%> Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> Line 3: <HTML> Source File: /Shared/LogOn.aspx Line: 1 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053 I have tried to resolve this error for like a day now. I am currently running with the internal web server of VS 2005 sp1. I have the Sain.dll in my bin folder cuase the assembly name use is sain and Root Namespace is DApplause . Please I need urgent help.

    Read the article

  • Converting the value from string to integer in a nested dictionary

    - by tom smith
    I want to change the numbers in my dictionary to int values for use later in my program. So far I have import time import math x = 400 y = 300 def read_next_object(file): obj = {} for line in file: if not line.strip(): continue line = line.strip() key, val = line.split(": ") if key in obj and key == "Object": yield obj obj = {} obj[key] = val yield obj planets = {} with open( "smallsolar.txt", 'r') as f: for obj in read_next_object(f): planets[obj["Object"]] = obj print(planets) scale=250/int(max([planets[x]["Orbital Radius"] for x in planets if "Orbital Radius" in planets[x]])) print(scale) and the output is {'Sun': {'Object': 'Sun', 'Satellites': 'Mercury,Venus,Earth,Mars,Jupiter,Saturn,Uranus,Neptune,Ceres,Pluto,Haumea,Makemake,Eris', 'Orbital Radius': '0', 'RootObject': 'Sun', 'Radius': '20890260'}, 'Moon': {'Object': 'Moon', 'Orbital Radius': '18128500', 'Period': '27.321582', 'Radius': '1737000.10'}, 'Earth': {'Object': 'Earth', 'Satellites': 'Moon', 'Orbital Radius': '77098290', 'Period': '365.256363004', 'Radius': '6371000.0'}} 3.2426140709476178e-06 I want to be able to convert the numbers in the dict to ints for further use. Any help in greatly appreciated.

    Read the article

  • converting NSTimer running not on main runloop to GCD

    - by Justin Galzic
    I have a task that runs periodically and it was originally designed to run on a separate run loop than the main runloop using NSThread and NSTimer. What's the best way to adapt this to take advantage of GCD? Current code: -(void)initiateSomeTask { [NSThread detachNewThreadSelector:@selector(startTimerTask) toTarget:self withObject:nil]; } -(void)startTimerTask { // We won't get back the main runloop since we're on a new thread NSRunLoop *myRunLoop = [NSRunLoop currentRunLoop]; NSPort *myPort = [NSMachPort port]; [myRunLoop addPort:myPort forMode:NSDefaultRunLoopMode]; NSTimer *myTimer = [NSTimer timerWithTimeInterval:10 /* seconds */ target:self selector:@selector(doMyTaskMethod) userInfo:nil repeats:YES]; [myRunLoop addTimer:myTimer forMode:NSRunLoopCommonModes]; [myRunLoop run]; } Is there anything I can do besides replace detachNewThreadSelector with dispatch_async?

    Read the article

  • Converting BMPs to avi

    - by Lucas
    I want to convert folders with video-frames in bitmaps into avi or mpeg files. I already have a VBScript which does a lot of stuff on those files, so it would be neat to integrate a functionallity to convert those folders automatically from my script. I can only find solutions that seem pretty low level and unfortunatley I don't know a whole lot about video file formats. What is the easiest approach to achieve that without reinventing the wheel? My problem is that there is seem to be so much information that I am not sure where to start.

    Read the article

  • problem with converting simple code to silverlight app.

    - by Sara
    Hi. I have this code for window form application and I have been attempting to convert it to a Silverlight application but it does not work!. There is a Textbox and I attached KeyDown event handler to it. when the user press the arrow key ( left or right) while the focus on the textbox, it will write . or -. When it is window form i used e.KeyCode and Keys.Right and its works great but when it is silverlight I used e.Key and key.Right and the program doesn't work good because the arrows do the 2 functions moving and write ./-. How I can work this out in Silverlight? (My English not good) The code ( window form): private void textBox1_KeyDown(object sender, KeyEventArgs e) { if (sender is TextBox) { TextBox textBox = (TextBox)sender; if (e.KeyCode == Keys.Left || e.KeyCode == Keys.Right) { e.Handled = true; char insert; if (e.KeyCode == Keys.Left) { insert = '.'; } else { insert = '-'; } int i = textBox.SelectionStart; textBox.Text = textBox.Text.Insert(i, insert.ToString()); textBox.Select(i + 1, 0); } } } (and Silverlight): private void textBox1_KeyDown(object sender, KeyEventArgs e) { if (sender is TextBox) { TextBox textBox = (TextBox)sender; if (e.Key == Key.Left || e.Key == Key.Right) { e.Handled = true; char insert; if (e.Key == Key.Left) { insert = '.'; } else { insert = '-'; } int i = textBox.SelectionStart; textBox.Text = textBox.Text.Insert(i, insert.ToString()); textBox.Select(i + 1, 0); } } } I don't understand, is there huge different effect between using Keycode/Keys and Key/Key or because something else?

    Read the article

  • Converting a time_t to string

    - by wyatt
    I have a time_t variable containing a timestamp which I'd like to store in a database, so I need it as a string. How would I convert it. Also, on the subject, how would I convert a timestamp string into a time_t varible? Thanks, Wyatt

    Read the article

  • MPXJ in .NET converting java Date to .NET DateTime

    - by Jeff
    I'm using the MPXJ library in .NET for parsing MS Project (MPP) files, and it's working great. The one issue I'm having is trying to translate the task Start and Finish date into .NET DateTime to use with my data models. I am going through all the tasks and calling task.getFinish() and task.getStart() that both return javva.util.Date objects. When I use task.getFinish().getYear(), task.getFinish().getMonth(), etc. to build up a new DateTime object it warns me that they are obsolete. What is the best way to get the start and finish dates from MPXJ into a .NET DateTime object? Thanks.

    Read the article

  • converting to Fluent NHibernate sessionmanager

    - by czuroski
    Hello, I am changing my application to use Fluent NHibernate. I have created my Fluent mapping files and have now moved onto configuring my Session Manager. Currently, I use the following code - private ISessionFactory GetSessionFactory() { return (new Configuration()).Configure().BuildSessionFactory(); } Along with my hibernate.cfg.xml - <?xml version="1.0" encoding="utf-8" ?> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" > <session-factory> <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> <property name="dialect">NHibernate.Dialect.InformixDialect1000</property> <property name="connection.driver_class">NHibernate.Driver.OleDbDriver</property> <property name="connection.connection_string">Provider=Ifxoledbc.2;Password=mypass;Persist Security Info=True;User ID=myid;Data Source=mysource</property> <property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property> <property name="show_sql">false</property> <mapping assembly="DataTransfer" /> </session-factory> </hibernate-configuration> Does anyone know how I could transfer this to Fluent? The problem I have having is with the Database portion of the configuration. Thanks for any thoughts.

    Read the article

  • Converting string to email-attachment on android

    - by sandis
    So I have som data that I have converted to a string. While I have found how to attach something from the SD-card to a mail, I cant figure out how to directly convert my string to a mail-attachment without involving the SD-card. In case it holds significance, I have read some data from a database, converted it to csv-format, and now wants to attach it as a csv-file. Cheers,

    Read the article

  • Python and C++ Sockets converting packet data

    - by yeus
    First of all, to clarify my goal: There exist two programs written in C in our laboratory. I am working on a Proxy Server (bidirectional) for them (which will also mainpulate the data). And I want to write that proxy server in Python. It is important to know that I know close to nothing about these two programs, I only know the definition file of the packets. Now: assuming a packet definition in one of the C++ programs reads like this: unsigned char Packet[0x32]; // Packet[Length] int z=0; Packet[0]=0x00; // Spare Packet[1]=0x32; // Length Packet[2]=0x01; // Source Packet[3]=0x02; // Destination Packet[4]=0x01; // ID Packet[5]=0x00; // Spare for(z=0;z<=24;z+=8) { Packet[9-z/8]=((int)(720000+armcontrolpacket->dof0_rot*1000)/(int)pow((double)2,(double)z)); Packet[13-z/8]=((int)(720000+armcontrolpacket->dof0_speed*1000)/(int)pow((double)2,(double)z)); Packet[17-z/8]=((int)(720000+armcontrolpacket->dof1_rot*1000)/(int)pow((double)2,(double)z)); Packet[21-z/8]=((int)(720000+armcontrolpacket->dof1_speed*1000)/(int)pow((double)2,(double)z)); Packet[25-z/8]=((int)(720000+armcontrolpacket->dof2_rot*1000)/(int)pow((double)2,(double)z)); Packet[29-z/8]=((int)(720000+armcontrolpacket->dof2_speed*1000)/(int)pow((double)2,(double)z)); Packet[33-z/8]=((int)(720000+armcontrolpacket->dof3_rot*1000)/(int)pow((double)2,(double)z)); Packet[37-z/8]=((int)(720000+armcontrolpacket->dof3_speed*1000)/(int)pow((double)2,(double)z)); Packet[41-z/8]=((int)(720000+armcontrolpacket->dof4_rot*1000)/(int)pow((double)2,(double)z)); Packet[45-z/8]=((int)(720000+armcontrolpacket->dof4_speed*1000)/(int)pow((double)2,(double)z)); Packet[49-z/8]=((int)armcontrolpacket->timestamp/(int)pow(2.0,(double)z)); } if(SendPacket(sock,(char*)&Packet,sizeof(Packet))) return 1; return 0; What would be the easiest way to receive that data, convert it into a readable python format, manipulate them and send them forward to the receiver?

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >