Search Results

Search found 3457 results on 139 pages for 'displaying'.

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

  • SDL_BlitSurface() not displaying image?

    - by Christian Gonzalez
    So I'm trying to display a simply image with the SDL library, but when I use the function SDL_BlitSurface() nothing happens, and all I get is a black screen. I should also note that I have the .bmp file, the source, and the executable file all in the same directory. //SDL Header #include "SDL/SDL.h" int main(int argc, char* args[]) { //Starts SDL SDL_Init(SDL_INIT_EVERYTHING); //SDL Surfaces are images that are going to be displayed. SDL_Surface* Hello = NULL; SDL_Surface* Screen = NULL; //Sets the size of the window (Length, Height, Color(bits), Sets the Surface in Software Memory) Screen = SDL_SetVideoMode(640, 480, 32, SDL_SWSURFACE); //Loads a .bmp image Hello = SDL_LoadBMP("Hello.bmp"); //Applies the loaded image to the screen SDL_BlitSurface(Hello, NULL, Screen, NULL); //Update Screen SDL_Flip(Screen); //Pause SDL_Delay(2000); //Deletes the loaded image from memory SDL_FreeSurface(Hello); //Quits SDL SDL_Quit(); return 0; }

    Read the article

  • Problem with ASP.NET MVC DropDownList not displaying selected value

    - by Jova
    I have an aspx page which allows me to edit articles. Among things I can edit is which category the article belongs to. The category is chosen through a DropDownList as shown here, <%= Html.DropDownList("categoryID", (IEnumerable<SelectListItem>)ViewData["CategoryID"], new { @class = "textbox" }) %> However, the articles category isn't selected when I go to that page. The ViewData I use for the DropDownList looks like this, ViewData["CategoryID"] = new SelectList(categories, "CategoryID", "Title", article.CategoryID); Which should select the article.CategoryID as it's selected value. Have I done this wrong?

    Read the article

  • displaying the values in textbox based on AJAX fetched entries

    - by Anurag
    hello, I've a table in which addition rows can be generatred as per the user need by clicking a javascript function. Each row has a drop down list, and based on the values of this an AJAX script fetchs some values which has to be displayed in corresponding textfields of the same row.. here is the code for HTML.. <td><div align="center"> <label> <select name="gcno1" id="gcno1" onchange="fetch_gc(this)"> <option value="0">NIL</option> <option value="2">1</option> <?php while($row=mysql_fetch_array($result)) { ?> <option value="<?php echo $row[0]; ?>"><?php echo $row[0]; ?></option> <?php }?> </select> </label> </div></td> <td><div align="center"><input name="date1" id="date1" type="text" size="10" /> </div></td> and here is the AJAX which I'm writing... xmlhttp = new XMLHttpRequest(); var value=encodeURIComponent(document.getElementById('gcno1').value); var parameters="param1="+value; xmlhttp.open("POST", 'fetch_gc.php', true); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.send(parameters); xmlhttp.onreadystatechange=function(){ if(xmlhttp.readyState == 4 && xmlhttp.status == 200) { var detail=xmlhttp.responseText.split('+'); alert(detail[0]); document.getElementsByName('date1').value=String(detail[0]); alert("life " + document.getElementById('gcno1').value); } } The alert inside the AJAX shows the correct response text, detail[0] but is unable to put the value in corresponding textbox i.e. with name 'gcno1'...... Please help me with this problem...

    Read the article

  • NavBar displaying back twice when app changed to landscape mode

    - by Graeme
    Hi, Not sure what's going on here, but my iPhone apps nav bar shows back and the title of my detail view controller even when I'm back to the original view. It wasn't happening earlier, it has changed recently (but not sure when exactly). E.g. I click on a row, view the didSelectRow XIB and then click back on the NavBar controller, but it still shows back even though the view does change back to the original table view. I then have to press back again and then it clears. Update: It's as if its trying to go back three times instead of two. Because, if you visit another row without removing the back button, it stores it as if you need to go back twice. It works fine in portrait mode. Any ideas?

    Read the article

  • Displaying build times in Visual Studio?

    - by Roger Lipscombe
    Our build server is taking too long to build one of our C++ projects. It uses Visual Studio 2008. Is there any way to get devenv.com to log the time taken to build each project in the solution, so that I know where to focus my efforts? Improved hardware is not an option in this case. I've tried setting the output verbosity (under Tools / Options / Projects and Solutions / Build and Run / MSBuild project build output verbosity). This doesn't seem to have any effect in the IDE. When running MSBuild from the command line (and, for Visual Studio 2008, it needs to be MSBuild v3.5), it displays the total time elapsed at the end, but not in the IDE. I really wanted a time-taken report for each project in the solution, so that I could figure out where the build process was taking its time. Alternatively, since we actually use NAnt to drive the build process (we use Jetbrains TeamCity), is there a way to get NAnt to tell me the time taken for each step?

    Read the article

  • Having a problem displaying data from last inserted data

    - by Gideon
    I'm designing a staff rota planner....have three tables Staff (Staff details), Event (Event details), and Job (JobId, JobDate, EventId (fk), StaffId (fk)). I need to display the last inserted job detail with the staff name. I've been at it for couple of hours and getting nowhere. Thanks for the help in advance. My code is the following: $eventId = $_POST['eventid']; $selectBox = $_POST['selectbox']; $timePeriod = $_POST['time']; $selectedDate = $_POST['date']; $count = count($selectBox); //constructing the staff selection if (empty($selectBox)) { echo "<p>You didn't select any member of staff to be assigned."; echo "<p><input type='button' value='Go Back' onClick='history.go(-1)'>"; } else { echo "<p> You selected ".$count. " staff for this show."; for ($i=0;$i<$count;$i++) { $selectId = $selectBox[$i]; //insert the details into the Job table in the database $insertJob = "INSERT INTO Job (JobDate, TimePeriod, EventId, StaffId) VALUES ('".$selectedDate."', '".$timePeriod."', ".$eventId.", ".$selectId.")"; $exeinsertJob = mysql_query($insertJob) or die (mysql_error()); } } //display the inserted job details $insertedlist = "SELECT Job.JobId, Staff.LastName, Staff.FirstName, Job.JobDate, Job.TimePeriod FROM Staff, Job WHERE Job.StaffId = Staff.StaffId AND Job.EventId = $eventId AND Job.JobDate = ".$selectedDate; $exeinsertlist = mysql_query($insertedlist) or die (mysql_error()); if ($exeinsertlist) { echo "<p><table cellspacing='1' cellpadding='3'>"; echo "<tr><th colspan=5> ".$eventname."</th></tr>"; echo "<tr><th>Job Id</th><th>Last Name</th> <th>First Name </th><th>Date</th><th>Hours</th></tr>"; while ($joblistarray = mysql_fetch_array($exeinsertlist)) { echo "<tr><td align=center>".$joblistarray['JobId']." </td><td align=center>".$joblistarray['LastName']."</td><td align=center>".$joblistarray['FirstName']." </td><td align=center>".$joblistarray['JobDate']." </td><td align=center>".$joblistarray['TimePeriod']."</td></tr>"; } echo "</table>"; echo "<h3><a href=AssignStaff.php>Add More Staff?</a></h3>"; } else { echo "The Job list can not be displayed at this time. Try again."; echo "<p><input type='button' value='Go Back' onClick='history.go(-1)'>"; }

    Read the article

  • FF extension: displaying an array of string elements in a sidebar

    - by sujay-jain
    I am developing a ff extension which displays a list of elements from an array (dynamic) in the sidebar. The array is dynamic and needs to be constructed in a function everytime the sidebar is opened (or any other event handler). Later, i will need to implement link functionality on parts of the string. What is the best way to go about this? I have created an empty sidebar and just know the label element as of now. menu, and menuitem dont work. What other elements can i use to display text in a good way which supports dynamic contruction. Is there some good tutorial/sample extension which i can see and learn?

    Read the article

  • displaying a saved buffer in OpenGL ES

    - by Adam
    Hi everyone, So basically I have a screenshot that I've saved that I want to later display on the screen. I've saved it with: glReadPixels(0, 0, self.bounds.size.width, self.bounds.size.height, GL_RGBA, GL_UNSIGNED_BYTE, savedBuffer); And later I'm trying to write it to the screen with: GLuint RenderedTex; glGenTextures(1, &RenderedTex); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, RenderedTex); glTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA, self.bounds.size.width, self.bounds.size.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, savedBuffer); glDisable(GL_TEXTURE_2D); I'm pretty new to OpenGL so I don't know if I'm doing things right... actually I know I'm not, because nothing shows up. Also not sure how to dispose of the texture when I'm done with it. Anyone know the correct way to do this? Edit: I think I might be having a problem loading the texture because it's not a power of 2, it's 320x480... also, I think this code is just loading the texture, but not drawing it, I'd need a call to glDrawArrays(GL_TRIANGLE_STRIP, 0, 4) in there somewhere...

    Read the article

  • Displaying success/failure messages from hidden iframe submit

    - by Erik Nelson
    I'm using the hidden iframe method to submit a form with a file upload field. I want to display a message back on the page using javascript and I'm not sure how to do this. If this was just a form with text fields I'd do an AJAX post and respond with a message I'd display in my callback function. I'm just not sure how to accomplish this same task with the hidden iframe method since it is a standard form post.

    Read the article

  • List view and list adapters for displaying json

    - by Rahul Varma
    Hi, I am trying to display the text from json in a list view. I got help for retrieving the json text from the following... http://www.josecgomez.com/2010/04/30/android-accessing-restfull-web-services-using-json/comment-page-1/#comment-498.... But my problem is that i cant figure out how to display them in list view. I also want to get only some of the text from url(for example, alerttext and date). Can anyone help me in declaring the list adapter and list view in order to display the data in the way i want... Plzzzz...

    Read the article

  • OpenGL Projection matrix won't allow displaying anything

    - by user272973
    I'm trying to get some basic OpenGL-ES with Shaders to run on the iPhone, based on some examples. For some reason my projection matrix refuses to result in something on the screen. It feels like a clipping plane is set very near but that contradicts with the values I supply. If I render the same scene with an Orthogonal projection matrix I see my object just no perspective obviously. Here's the code that generates the projection matrix: esPerspective(&proj, 45.f, 768.0/1024.0, 1.f, 10000.f); void esPerspective(ESMatrix *result, float fovy, float aspect, float nearZ, float farZ) { float frustumW, frustumH; frustumH = tanf( fovy / 360.0f * PI ) * nearZ; frustumW = frustumH * aspect; esFrustum( result, -frustumW, frustumW, -frustumH, frustumH, nearZ, farZ ); } void esFrustum(ESMatrix *result, float left, float right, float bottom, float top, float nearZ, float farZ) { float deltaX = right - left; float deltaY = top - bottom; float deltaZ = farZ - nearZ; ESMatrix frust; if ( (nearZ <= 0.0f) || (farZ <= 0.0f) || (deltaX <= 0.0f) || (deltaY <= 0.0f) || (deltaZ <= 0.0f) ) return; frust.m[0][0] = 2.0f * nearZ / deltaX; frust.m[0][1] = frust.m[0][2] = frust.m[0][3] = 0.0f; frust.m[1][1] = 2.0f * nearZ / deltaY; frust.m[1][0] = frust.m[1][2] = frust.m[1][3] = 0.0f; frust.m[2][0] = (right + left) / deltaX; frust.m[2][1] = (top + bottom) / deltaY; frust.m[2][2] = -(nearZ + farZ) / deltaZ; frust.m[2][3] = -1.0f; frust.m[3][2] = -2.0f * nearZ * farZ / deltaZ; frust.m[3][0] = frust.m[3][1] = frust.m[3][3] = 0.0f; esMatrixMultiply(result, &frust, result); } My projection matrix comes out as: [3.21, 0, 0, 0] [0, 2.41, 0, 0] [0, 0, -1, -1] [0, 0, -2, 0] Even if I manually set the [3][3] cell to 1 I still don't see anything. Any ideas?

    Read the article

  • Mobile web on nokia devices not displaying centain elements

    - by Jan de Jager
    So i have a site which is rendered with our in-house portal engine. It resizes images and adjusts style-sheets automatically in real-time. Issue is that some html elements are inexplicably disappearing due to what only can be described as HTML compatibility. But the problem is not consistent. And only seems to be an issue on some nokia devices. I have tried to install the Nokia Mobile Browser Emulator... but its the worst piece of software i have seen in my life... after 4 hours of installing and uninstalling different versions of JRE, i still can't get it to install. EDIT: Problem now residing at http://wiseguy.mobi/?PageID=657

    Read the article

  • Retrieving and displaying a contact name from a contact id while using a SimpleCursorAdapter

    - by Henrique
    I am storing information on the phone's contacts using a sqlite database. The fields I am storing are: _id, contact_id, body where _id is the row's id, contact_id is the phone contact's id and body is just a simple text which is the actual information I am storing. I'm using a SimpleCursorAdapter to map the data to the view, like so: Cursor cursor = database.fetchInformation(); // fetch info from DB String[] from = new String[] { CONTACT_ID, BODY }; int[] to = new int[] { R.id.contact, R.id.body }; SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout.row, cursor, from, to); getListView().setAdapter(adapter); What I would actually want is to get the contact name that is associated with this CONTACT_ID, and have that be shown in the view. I can't seem to find a simple solution. I've tried implementing my own SimpleCursorAdapter and rewriting setViewText(TextView, String) but it didn't work. Also, it just seems overly complicated for such a simple task. Any help? Thanks.

    Read the article

  • Cocoa class not displaying data in NSWindow

    - by Matt S.
    I have one class that controls one window, and another class that controls a different window in the same xib, however, the second window never displays what it should. In the first class I alloc and init the second class, then pass some information to it. In the second class it displays that data in the table view. Yes, in the .xib I have all the connections set up correctly, I've quadruple checked. Also the code is correct, same with the connections, I've quadruple checked.

    Read the article

  • Displaying current time above the thumb of a slider in Silverlight

    - by Scharrels
    I've made a time slider in Silverlight. To style it, I've made a control template and modified the style. I've added a text field above the thumb (always centered above the thumb), which should display the time. However, I can't find any way to access the slider information (e.g. current value) or find another way to pass any information to the style, which I can then data bind to the text field. So my question in short: how can I display time information above the thumb?

    Read the article

  • A good solution for displaying galleries with lytebox and php

    - by Johann
    Hello I have thought for a while over an issue with the loading of images on a website-solution that I have programmed (For fun and the experience) The programming language used is PHP with MYSQL as the database language It also uses javascript, but not extensively I have recently realized that the engine I programmed, while it has it's smart solutions also carry a lot of flaws and redundant code. I have therefore decided to make a new one, now incorporating what I know, but didn't when I started the previous project. For the new system, there will be an option to add galleries to a site, and upload images to it. I have used the javascript image viewer Lytebox before. The screen goes dark and an image appears with a "Previous" and "next" button to view the other images. The problem is that I used groups with lytebox and the images themselves, resized as thumbs. This causes lytebox to work only when all the images have loaded. If you click a link before that, the image is shown as if you right click and choose "Show image" Information about these images is parsed from a database using a while statement with a counter that goes from 0 to sizeof() I'm thinking it probably isn't a good idea to have the images as the thumbs, even if you restrict the upload size. Likewise, adding thumbs at upload also seems like a hassle. It would be practical if the thumbs didn't show up before they were fully loaded. Has anyone got any good tips. Any help would be appreciated. Johann

    Read the article

  • API for displaying graphs in a web app?

    - by Rosarch
    I have graphs (nodes/arcs) that I want to display to the user. I need to be able to capture the event of a user clicking on a node. Something like Google Charts API's Simple Org Chart would be great, but it looks like it only supports trees. What other service can I use? Or should I hack something ugly together using Google Charts?

    Read the article

  • NETCF - Displaying custom shaped form in compact framework

    - by Nullstr1ng
    Hi guys, I am developing some small little application that sits on the screen and on top of all window and flies around the screen, could be a bird or a butterfly or a fish. But I have a little bit of problem. How do I redraw the background without my images included? or how do I copy the background (not the wallpaper) behind my form with image? is it possible to have a custom shaped form also? currently, the app looks like this the 2nd image with X is what I currently have (it has some sort of tearing) and it's supposed to be the 1st one with check mark.

    Read the article

  • Displaying an image from the tmp directory

    - by Roland
    I have the following. A website that create temporarily images in the /tmp folder on the Linux server. The reason why I store it within this folder is since these images need to be cleared once in a while and it's so much easier just to clear the tmp directory using tmpwatch. Now my issue is to display the image within my browser? Code <img src="/tmp/3d34636.png" alt="image" /> I'm running Centos with PHP

    Read the article

  • displaying german characters in iphone

    - by Jaimin
    i have following string coming in the json response. "Gas-Heizung-Sanit\u00e4r" so how to display it. i want to display that \u00e4 as a german character.. NSString *str = "Gas-Heizung-Sanit\u00e4r"; NSLog(@"%c",str); it only prints the german character.

    Read the article

  • Displaying very large images on the iPad

    - by Brodie4598
    I need to display some very large images on the iPad. The files are jpgs and are about 6700x2700 (maps). Is there any way around loading the entire image into memory? Currently I load it int a scroll view for zooming/panning. The images are stored locally on the device.

    Read the article

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