Search Results

Search found 8354 results on 335 pages for 'welton v3 50'.

Page 58/335 | < Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >

  • Why is my "Page [0]" not centered in my webpage?

    - by William
    My "Page [0]" text isn't centered on my webpage. Anyone know why? I could really use some help please. Here is the html: <html> <head> <title>Test Forum</title> <link href="http://prime.programming-designs.com/test_forum/style.css" rel="stylesheet" type="text/css" /> </head> <body> <a href="http://prime.programming-designs.com/test_forum/"><img src="http://prime.programming-designs.com/test_forum//images/banner1.png" alt="" id="banner" /></a> <h1>Test Forums</h1> <hr /> <div id="navi"><div id="naviheader">Boards</div><a href="http://prime.programming-designs.com/test_forum/viewboard.php?board=0">Testing</a><br /><a href="http://prime.programming-designs.com/test_forum/viewboard.php?board=1">General Discussion</a><br /><a href="http://prime.programming-designs.com/test_forum/viewboard.php?board=2">Video Games</a><br /><a href="http://prime.programming-designs.com/test_forum/viewboard.php?board=3">Anime and Manga</a><br /><a href="http://prime.programming-designs.com/test_forum/viewboard.php?board=4">BlazBlue</a><br /><a href="http://prime.programming-designs.com/test_forum/viewboard.php?board=5">Shin Megami Tensei</a><br /><a href="http://prime.programming-designs.com/test_forum/viewboard.php?board=6">Earthbound</a><br /><a href="http://prime.programming-designs.com/test_forum/viewboard.php?board=7">Phantasy Star</a><br /><a href="http://prime.programming-designs.com/test_forum/viewboard.php?board=8">Mobile Suit Gundam</a><br /></div> <div class="postbox"><h4>CyanPrime</h4><hr />Welcome to the King's Gate BBS!</div>Page: [<a href="http://prime.programming-designs.com/test_forum/index.php?page=0">0</a>] </body> </html> Here is the CSS: @charset "windows-1252"; body{ background-color: #EEFFF8; color: #000000; text-align: center; } .postbox{ text-align: left; margin: auto; background-color: #dbfef8; border: 1px solid #82FFCD; width: 50%; margin-top: 10px; } .stickypostbox{ text-align: left; margin: auto; background-color: #F5FFFA; border: 1px solid #82FFCD; width: 50%; margin-top: 10px; } h4{ margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; color: #9932CC; } h1{ color: #551A8B; } hr{ color: #82FFCD; background-color: #82FFCD; height: 1px; border: 0px dotted #82FFCD; } a{ color: #7F00FF; text-decoration: none; } a:hover{ color: #7F00FF; text-decoration: underline; } form{ margin: 0px auto; width: 50%; } #formdiv { background-color:#dbfef8; border:1px solid #82FFCD; } .fielddiv1{ background-color: #f9f9f9; border: 1px solid #DBFEF8; vertical-align: middle; width: 45%; float: left; } .fielddiv2{ background-color: #f9f9f9; border: 1px solid #DBFEF8; vertical-align: middle; width: 100%; } .fieldtext1{ width: 50%; background-color: #82FFCD; float: left; } .fieldtext2{ width: 100%; background-color: #82FFCD; } #replydiv{ width: 100%; background-color: #DBFEF8; margin: 10px 0 10px 0; } #admindiv{ width: 100%; background-color: #DBFEF8; margin: 10px 0 10px 0; } #navi{ width: 200px; background-color: #dbfef8; border: 1px solid #82FFCD; text-align: left; float: left; } #naviheader{ width: 100%; background-color: #82FFCD; } #submitbutton{ border: 1px solid #82FFCD; background-color: #DBFEF8; color: #000000; margin-top: 5px; width: 100px; height: 20px; } #banner{ border: 1px solid #82FFCD; } .postbar{ margin-right: 0px; margin-top: 0px; } .bannedtext{ margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; color: #FF0000; } And here is the webpage so you can get some context (you'll notice that my "page [0]" is centered on the other boards, but not the index. http://prime.programming-designs.com/test_forum/

    Read the article

  • Is it possible to calculate distance on GeoDjango in a SELECT statement?

    - by alex
    I am using MYSQL. I have a table with 1 column, a Point field. I want to SELECT all rows that have a point with a distance less than 50 meters of my given point. Simple enough, right? Below is how it's done in RAW SQL. But of course, I want to use GeoDjango to do this. cursor.execute("SELECT * FROM project_location WHERE\ (GLength(LineStringFromWKB(LineString(asbinary(utm), asbinary(PointFromWKB(point(%s, %s)))))) < 50)\

    Read the article

  • Is it possible to use ContainsTable to get results for more than one column?

    - by LockeCJ
    Consider the following table: People FirstName nvarchar(50) LastName nvarchar(50) Let's assume for the moment that this table has a full-text index on it for both columns. Let's suppose that I wanted to find all of the people named "John Smith" in this table. The following query seems like a perfectly rational way to accomplish this: SELECT * from People p INNER JOIN CONTAINSTABLE(People,*,'"John*" AND "Smith*"') Unfortunately, this will return no results, assuming that there is no record in the People table that contains both "John" and "Smith" in either the FirstName or LastName columns. It will not match a record with "John" in the FirstName column, and "Smith" in the LastName column, or vice-versa. My question is this: How does one accomplish what I'm trying to do above? Please consider that the example above is simplified. The real table I'm working with has ten columns and the input I'm receiving is a single string which is split up based on standard word breakers (space, dash, etc.)

    Read the article

  • jQuery's next() on elements not next to each other

    - by Rio
    I have bits of horrible code I have to deal with ... <div class="container"> ... <tr> <td width="100" height="50"> <a class="swaps"><img src="http://www.blah.jpg" alt="Some Title" id="1"></a></span></td> </tr> <tr> <td width="100" height="50"> <a class="swaps"><img src="http://www.blah2.jpg" alt="Another title" id="2"></a></span></td> </tr> </div> If I use var thisone = $("#container .swaps:first") to select the first one (with id 1) why do I have trouble selecting thisone.next()?

    Read the article

  • How to have ListView items with Label show up at the bottom of the item not to the right in WPF?

    - by Joan Venge
    I am using a WrapPanel with an Image and Label, but the Label shows up to the right of the item. How can I make it show up at the bottom of the Image/Item? <Window.Resources> <DataTemplate x:Key="ItemTemplate"> <WrapPanel Orientation="Horizontal"> <Image Width="50" Height="50" Stretch="Fill" Source="{Binding Cover}"/> <Label Content="{Binding Title}" /> </WrapPanel> </DataTemplate> </Window.Resources>

    Read the article

  • Wrap text around an image in rails and prawn

    - by stevenheidel
    I have a document with dynamic image and dynamic text and would like the text around the image. The image is right aligned on the landscape page. Here is what I have so far: pdf.bounding_box([0,pdf.bounds.top - 50], :width => pdf.bounds.width, :height => pdf.bounds.height-50) do pdf.text @article.title, :size => 30, :style => :bold pdf.text @article.content, :align => :left # image pdf.bounding_box([pdf.bounds.right - 250, pdf.bounds.top], :width => 250, :height => 250) do pdf.image image_path, :width => 250 end end The text goes right underneath the image. I tried doing this http://stackoverflow.com/questions/2085151/ruby-prawn-how-to-wrap-text-around-an-aligned-right-image but it didn't work. Help is appreciated, thanks.

    Read the article

  • Hosting solution for images for website written in PHP

    - by tomaszs
    I've written a website in PHP and it will have ability for users to upload images. My website will have more than 100.000 users. Aprox. 1k users will upload image about 50 KB. And every image will be displayed on this website 5k times so it's transfer of: 1k x 50 KB x 5k = 250 GB per month. So my question is: Do you know any good solution (hosting or CDN network or else) that: will be payed for transfer not space used and no entrance fee will have API to upload images easily with PHP is extremely easy to use will be good for low budget will not require any special, complicated registration and formal things will allow commercial use will allow using this images in website layout ?

    Read the article

  • showing null rows using join

    - by Pradyut Bhattacharya
    Hi, In mysql i m selecting from a table shouts having a foreign key to another table named "roleuser" with the matching column as user_id Now the user_id column in the shouts table for some rows is null (not actually null but with no inserts in mysql) How to show all the rows of the shouts table either with user_id null or not I m executing the sql statement SELECT s.*, r.firstname, r.lastname FROM shouts s left join roleuser r where r.user_id = s.user_id limit 50; which does not executes and shows You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where r.user_id = s.user_id limit 50' at line 2 but using inner join the sql executes which shows rows which only have user_id values in the shouts table. the nulls are not shown. SELECT s.*, r.firstname, r.lastname FROM shouts s inner join roleuser r where r.user_id = s.user_id limit 50; How can i show all the rows from the shouts table and null values in the firstname and lastname columns where the user_id is null in the shouts table. If not at all possible with sql may be using stored procedures... Thanks Pradyut

    Read the article

  • Header file-name as argument

    - by Alphaneo
    Objective: I have a list of header files (about 50 of them), And each header-file has few arrays with constant elements. I need to write a program to count the elements of the array. And create some other form of output (which will be used by the hardware group). My solution: I included all the 50 odd files and wrote an application. And then I dumped all the elements of the array into the specified format. My environment: Visual Studio V6, Windows XP My problem: Each time there is a new set of Header files, I am now changing the VC++ project settings to point to the new set of header files, and then rebuild. My question: A bit in-sane though, Is there any way to mention the header from some command line arguments or something? I just want to avoid re-compiling the source every time...

    Read the article

  • Cant get flexigrid to work in Jquery Tools Tab

    - by John
    Im fairly new to jquery and Im using jquery tools for tabs. I am wanting in one of the tabs to show flexigrid, but when I try to do this flexigrid does not show up, its just blank. If I setup flexigrid in a stand alone page outside the tab it works just fine. Below is the code that isnt working. Again Im new so please go easy! <ul class="css-tabs"> <li><a href="#details">Account Details</a></li> <li><a href="#accounts">Sub Accounts</a></li> <li><a href="#groups">Groups</a></li> <li><a href="#support">Tickets</a></li> </ul> <div class="css-panes"> <div>Tab 1</div> <div><table id="flex1" style="display:none"></table></div> <div>Tab 3</div> <div>Tab 4</div> </div> <script> $(function() { $("ul.css-tabs").tabs("div.css-panes > div").history(); }); $('.flexme1').flexigrid(); $('.flexme2').flexigrid({height:'auto',striped:false}); $("#flex1").flexigrid ( { url: '/accounts_list.php', dataType: 'json', colModel : [ {display: 'ID', name : 'id', width : 45, sortable : true, align: 'center'}, {display: 'Username', name : 'username', width : 120, sortable : true, align: 'left'}, {display: 'Display Name', name : 'displayname', width : 150, sortable : true, align: 'left'}, {display: 'Limit', name : 'accounts', width : 50, sortable : true, align: 'center'}, {display: 'Rate', name : 'charge', width : 50, sortable : true, align: 'center'}, {display: 'Subs', name : 'subcount', width : 50, sortable : true, align: 'center'} ], searchitems : [ {display: 'ID', name : 'id'}, {display: 'Username', name : 'username', isdefault: true}, {display: 'Display Name', name : 'displayname'} ], sortname: "id", sortorder: "desc", usepager: true, singleSelect: true, title: 'Test', useRp: true, rp: 20, showTableToggleBtn: false, width: 500, height: 250 }); </script>

    Read the article

  • Actionscript 3 reflection class questions

    - by VPDD
    I found this reflection class: http://www.adobe.com/devnet/flash/articles/reflect_class_as3.html However, I have some questions about it. Let´s say I have a moviclip named “ref_mc”, to add a reflection I use: import com.pixelfumes.reflect.*; var r1:Reflect = new Reflect({mc:ref_mc, alpha:50, ratio:50, distance:0, updateTime:0, reflectionDropoff:1}); Now, the questions: 1) How do I update the parameters for the reflection r1 after it is created? 2) Is there a way to check whether the movieclip “ref_mc” already has a reflection? 3) Anyone has the .fla for the example with bars adjustments and code sample shown on the page (it is not on the download .zip)? Thanks in advance.

    Read the article

  • Reinforcement learning with neural networks

    - by Betamoo
    I am working on a project with RL & NN I need to determine the action vector structure which will be fed to a neural network.. I have 3 different actions (A & B & Nothing) each with different powers (e.g A100 A50 B100 B50) I wonder what is the best way to feed these actions to a NN in order to yield best results? 1- feed A/B to input 1, while action power 100/50/Nothing to input 2 2- feed A100/A50/Nothing to input 1, while B100/B50/Nothing to input 2 3- feed A100/A50 to input 1, while B100/B50 to input 2, while Nothing flag to input 3 4- Also to feed 100 & 50 or normalize them to 2 & 1 ? I need reasons why to choose one method Any suggestions are recommended Thanks

    Read the article

  • fgets and strcmp [C]

    - by Blackbinary
    I'm trying to compare two strings. One stored in a file, the other retrieved from the user (stdin). Here is a sample program: int main() { char targetName[50]; fgets(targetName,50,stdin); char aName[] = "bob"; printf("%d",strcmp(aName,targetName)); return 0; } In this program, strcmp returns a value of -1 when the input is 'bob'. Why is this? I thought they should be equal. How can i get it so that they are?

    Read the article

  • Isn't INT more efficient than UNIQUEIDENTIFIER?

    - by ck
    I have a parent table and child table where the columns that join them together are the UNIQUEIDENTIFIER type. The child table has a clustered index on the column that joins it to the parent table (its PK, which is also clustered). I have created a copy of both of these tables but changed the relationship columns to be INTs instead, have rebuilt the indexes so that they are essentially the same structure and can be queried in the same way. When I query for a known 20 records from the parent table, pulling in all the related records from the child tables, I get identical query costs across both, i.e. 50/50 cost for the batches. If this is true, then my giant project to change all of the tables like this appears to be pointless, other than speeding up inserts. Can anyone provide any light on the situation?

    Read the article

  • BioPython: extracting sequence IDs from a Blast output file

    - by Jon
    Hi, I have a BLAST output file in XML format. It is 22 query sequences with 50 hits reported from each sequence. And I want to extract all the 50x22 hits. This is the code I currently have, but it only extracts the 50 hits from the first query. from Bio.Blast import NCBIXM blast_records = NCBIXML.parse(result_handle) blast_record = blast_records.next() save_file = open("/Users/jonbra/Desktop/my_fasta_seq.fasta", 'w') for alignment in blast_record.alignments: for hsp in alignment.hsps: save_file.write('>%s\n' % (alignment.title,)) save_file.close() Somebody have any suggestions as to extract all the hits? I guess I have to use something else than alignments. Hope this was clear. Thanks! Jon

    Read the article

  • Sorting tree with a materialized path?

    - by Ovid
    I have a tree structure in a table and it uses materialized paths to allow me to find children quickly. However, I also need to sort the results depth-first, as one would expect with threaded forum replies. id | parent_id | matpath | created ----+-----------+---------+---------------------------- 2 | 1 | 1 | 2010-05-08 15:18:37.987544 3 | 1 | 1 | 2010-05-08 17:38:14.125377 4 | 1 | 1 | 2010-05-08 17:38:57.26743 5 | 1 | 1 | 2010-05-08 17:43:28.211708 7 | 1 | 1 | 2010-05-08 18:18:11.849735 6 | 2 | 1.2 | 2010-05-08 17:50:43.288759 9 | 5 | 1.5 | 2010-05-09 14:02:43.818646 8 | 6 | 1.2.6 | 2010-05-09 14:01:17.632695 So the final results should actually be sorted like this: id | parent_id | matpath | created ----+-----------+---------+---------------------------- 2 | 1 | 1 | 2010-05-08 15:18:37.987544 6 | 2 | 1.2 | 2010-05-08 17:50:43.288759 8 | 6 | 1.2.6 | 2010-05-09 14:01:17.632695 3 | 1 | 1 | 2010-05-08 17:38:14.125377 4 | 1 | 1 | 2010-05-08 17:38:57.26743 5 | 1 | 1 | 2010-05-08 17:43:28.211708 9 | 5 | 1.5 | 2010-05-09 14:02:43.818646 7 | 1 | 1 | 2010-05-08 18:18:11.849735 How would I work that out? Can I do that in straight SQL (this is PostgreSQL 8.4) or should additional information be added to this table?

    Read the article

  • CSS vertical centering split background image not overlapping

    - by user295292
    is it possible to split 2 images vertically and when resizing the browser, it wont overlap but stay vertically centered? can the left image stay fixed so the right side of it won't cut off(overlap) this is what i have now, but when resizing the browser smaller, it pushes the left image underneath the right. rather have the images cut off on the outer sides and never overlap each other in the middle, make sense? #wrapper { width:1680px; max-width:1680px; height:500px; margin: 0 auto; } #left-image { width: 50%; position:absolute; left: auto; height:500px; } #right-image { width: 50%; position:absolute; right: 0px; height:500px; }

    Read the article

  • Problem with ColdFusion communicating with MySQL database

    - by Greg
    Hi, I have been working to migrate a non-profit website from a local server (running Windows XP) to a GoDaddy hosting account (running Linux). Most of the pages are written in ColdFusion. Things have gone smoothly, up until this point. There is a flash form within the site (see this page: http://www.preservenet.cornell.edu/employ/submitjob.cfm) which, when completed, takes the visitor to this page: submitjobaction.cfm . I'm not quite sure what to make of this error, since I copied exactly what had been in the old MySQL database, and the .cfm files are exactly as they had been when they worked on the old server. Am I missing something? Below is the code from the database that the error seems to be referring to. When I change "Positionlat" to some default value in the database as it suggests in the error, it says that another field needs a default value, and it's a neverending chain of errors as I try to correct it. This is probably a stupid error that I'm missing, but I've been working at it for days and can't find what I'm missing. I would really appreciate any help. Thanks! -Greg DROP TABLE IF EXISTS employopp; CREATE TABLE employopp ( POSTID int(10) NOT NULL auto_increment, USERID varchar(10) collate latin1_general_ci default NULL, STATUS varchar(10) collate latin1_general_ci NOT NULL default 'ACTIVE', TYPE varchar(50) collate latin1_general_ci default 'professional', JOBTITLE varchar(70) collate latin1_general_ci default NULL, NUMBER varchar(30) collate latin1_general_ci default NULL, SALARY varchar(40) collate latin1_general_ci default NULL, ORGNAME varchar(70) collate latin1_general_ci default NULL, DEPTNAME varchar(70) collate latin1_general_ci default NULL, ORGDETAILS mediumtext character set utf8 collate utf8_unicode_ci, ORGWEBSITE varchar(200) collate latin1_general_ci default NULL, ADDRESS varchar(60) collate latin1_general_ci default 'none given', ADDRESS2 varchar(60) collate latin1_general_ci default NULL, CITY varchar(30) collate latin1_general_ci default NULL, STATE varchar(30) collate latin1_general_ci default NULL, COUNTRY varchar(3) collate latin1_general_ci default 'USA', POSTALCODE varchar(10) collate latin1_general_ci default NULL, EMAIL varchar(75) collate latin1_general_ci default NULL, NOMAIL varchar(5) collate latin1_general_ci default NULL, PHONE varchar(20) collate latin1_general_ci default NULL, FAX varchar(20) collate latin1_general_ci default NULL, WEBSITE varchar(200) collate latin1_general_ci default NULL, POSTDATE varchar(10) collate latin1_general_ci default NULL, POSTUNTIL varchar(20) collate latin1_general_ci default 'select date', POSTUNTILFILLED varchar(20) collate latin1_general_ci NOT NULL default 'until filled', texteHTML mediumtext character set utf8 collate utf8_unicode_ci, HOWTOAPPLY mediumtext character set utf8 collate utf8_unicode_ci, CONFIRSTNM varchar(30) collate latin1_general_ci default NULL, CONLASTNM varchar(60) collate latin1_general_ci default NULL, POSITIONCITY varchar(30) collate latin1_general_ci default NULL, POSITIONSTATE varchar(30) collate latin1_general_ci default NULL, POSITIONCOUNTRY varchar(3) collate latin1_general_ci default 'USA', POSITIONLAT varchar(50) collate latin1_general_ci NOT NULL, POSITIONLNG varchar(50) collate latin1_general_ci NOT NULL, PRIMARY KEY (POSTID) ) ENGINE=MyISAM AUTO_INCREMENT=2007 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

    Read the article

  • UITextField keyboard difference between simulator and real device

    - by Raphael Pinto
    Hi, I am trying get float value with UITextField. On the simulator V3.1.3 in English, I have to use '.' to separate my float values. But on my Iphone 3GS V3.1.3 in French, I have to use ',' to separate them. If I use '.' on my Iphone 3GS, my float is troncated : 3.22222 = 3.0000000 Is there a solution to detect the language version and use the good separator automaticaly?

    Read the article

  • Problem in retrieving the ini file through web page

    - by MalarN
    Hi All, I am using an .ini file to store some values and retrieve values from it using the iniparser. When I give (hardcode) the query and retrive the value through the command line, I am able to retrive the ini file and do some operation. But when I pass the query through http, then I am getting an error (file not found), i.e., the ini file couldn't be loaded. Command line : int main(void) { printf("Content-type: text/html; charset=utf-8\n\n"); char* data = "/cgi-bin/set.cgi?pname=x&value=700&url=http://IP/home.html"; //perform some operation } Through http: .html function SetValue(id) { var val; var URL = window.location.href; if(id =="set") { document.location = "/cgi-bin/set.cgi?pname="+rwparams+"&value="+val+"&url="+URL; } } .c int * Value(char* pname) { dictionary * ini ; char *key1 = NULL; char *key2 =NULL; int i =0; int val; ini = iniparser_load("file.ini"); if(ini != NULL) { //key for fetching the value key1 = (char*)malloc(sizeof(char)*50); if(key1 != NULL) { strcpy(key1,"ValueList:"); key2 = (char*)malloc(sizeof(char)*50); if(key2 != NULL) { strcpy(key2,pname); strcat(key1,key2); val = iniparser_getint(ini, key1, -1); if(-1 == val || 0 > val) { return 0; } } else { //error free(key1); return; } } else { printf("ERROR : Memory Allocation Failure "); return; } } else { printf("ERROR : .ini File Missing"); return; } iniparser_freedict(ini); free(key1); free(key2); return (int *)val; } void get_Value(char* pname,char* value) { int result =0; result = Value(pname); printf("Result : %d",result); } int main(void) { printf("Content-type: text/html; charset=utf-8\n\n"); char* data = getenv("QUERY_STRING"); //char* data = "/cgi-bin/set.cgi?pname=x&value=700&url=http://10.50.25.40/home.html"; //Parse to get the values seperately as parameter name, parameter value, url //Calling get_Value method to set the value get_Value(final_para,final_val); } * file.ini * [ValueList] x = 100; y = 70; When the request is sent through html page, I am always getting .ini file missing. If directly the request is sent from C file them it works fine. How to resolve this?

    Read the article

  • Embedding Facebook in an IFrame

    - by Matthew Kruskamp
    I have an app that has an IFrame with a page flash overly allowing you to draw on webpages. When I go to Facebook with the application, an overlay pops up covering everything at 50% opacity (Which is fine). The problem is that the overlay is all black in some installations of IE7. Can anyone advise on how to get around this? Here is the code that they have that does this. <div style="z-index: 1000001; position: absolute; filter: alpha(opacity = 50); WIDTH: 9999px; background: black; height: 9999px; top: 0px; left: 0px; opacity: 0.5;" onclick="top.location.href=window.location.href"/> Is there something I can do with meta tags or something to get the filter alpha to work correctly?

    Read the article

  • How to setup split test?

    - by John Isaacks
    I want to create a way to test different layouts on a page to see which get more conversions. For example. If I have 2 versions of a page and I send 50% to page A and 50% to page B and see which one converts more sales. So I am thinking maybe use .htaccess to rewrite half to page A and the other half to page B. But how can I do that with .htaccess is there a way? do I need to use PHP instead to do this? Also if there is a better way to do this, or any cautions I should be aware of, please let me know.

    Read the article

  • CSS vertcial centering split background image not overlapping

    - by user295292
    is it possible to split 2 images vertically and when resizing the browser, it wont overlap but stay vertically centered? can the left image stay fixed so the right side of it won't cut off(overlap) this is what i have now, but when resizing the browser smaller, it pushes the left image underneath the right. rather have the images cut off on the outer sides and never overlap each other in the middle, make sense? wrapper { width:1680px; max-width:1680px; height:500px; margin: 0 auto; } left-image { width: 50%; position:absolute; left: auto; height:500px; } right-image { width: 50%; position:absolute; right: 0px; height:500px; }

    Read the article

  • Something is wrong with this C code to reverse string, but I dont know what ? please help

    - by Harbhag
    Hi all, I am beginnner to programming. I wrote this little program to reverse a string. But if I try to reverse a string which is less than 5 characters long then it gives wrong output. I cant seem to find whats wrong. #include<stdio.h> #include<string.h> int main() { char test[50]; char rtest[50]; int i, j=0; printf("Enter string : "); scanf("%s", test); int max = strlen(test) - 1; for ( i = max; i>=0; i--) { rtest[j] = test[i]; j++; } printf("Reversal is : %s\n", rtest); return 0; }

    Read the article

  • Delay keyboard input help

    - by Stradigos
    I'm so close! I'm using the XNA Game State Management example found here and trying to modify how it handles input so I can delay the key/create an input buffer. In GameplayScreen.cs I've declared a double called elapsedTime and set it equal to 0. In the HandleInput method I've changed the Key.Right button press to: if (keyboardState.IsKeyDown(Keys.Left)) movement.X -= 50; if (keyboardState.IsKeyDown(Keys.Right)) { elapsedTime -= gameTime.ElapsedGameTime.TotalMilliseconds; if (elapsedTime <= 0) { movement.X += 50; elapsedTime = 10; } } else { elapsedTime = 0; } The pseudo code: If the right arrow key is not pressed set elapsedTime to 0. If it is pressed, the elapsedTime equals itself minus the milliseconds since the last frame. If the difference then equals 0 or less, move the object 50, and then set the elapsedTime to 10 (the delay). If the key is being held down elapsedTime should never be set to 0 via the else. Instead, after elapsedTime is set to 10 after a successful check, the elapsedTime should get lower and lower because it's being subtracted by the TotalMilliseconds. When that reaches 0, it successfully passes the check again and moves the object once more. The problem is, it moves the object once per press but doesn't work if you hold it down. Can anyone offer any sort of tip/example/bit of knowledge towards this? Thanks in advance, it's been driving me nuts. In theory I thought this would for sure work. CLARIFICATION Think of a grid when your thinking about how I want the block to move. Instead of just fluidly moving across the screen, it's moving by it's width (sorta jumping) to the next position. If I hold down the key, it races across the screen. I want to slow this whole process down so that holding the key creates an X millisecond delay between it 'jumping'/moving by it's width. EDIT: Turns out gameTime.ElapsedGameTime.TotalMilliseconds is returning 0... all of the time. I have no idea why.

    Read the article

< Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >