- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
36 Posted Topics
Re: Syntax for getline [code] getline(INSTREAM, HOLDING VARIABLE, DELIM); [/code] Your instream would be your myfile, your holding variable is your variable that you store the line into, and the delim is the character that getline stops reading at. | |
Re: Correct me if I'm wrong, but crtl + x isn't z. | |
Re: Your compMove does not return 1, 2, or 3. But instead 49, 50, or 51 | |
Re: What will really help you is to make a pseudo code of this program. Mess around with the grid-array and how choosing which array spot corrisponds to the spot on the grid. | |
Re: In mean_average [code] for(int i= 0; i <= num_items; i++) [/code] You want to loop until less than num_items or else you will walk off the array. | |
I am planning on writing a website that retrieves information from websites that require logins. Originally my intention was to AJAX most of it so I could provide the information in nearly realtime but the problem lies in browsers not allowing cross domain requests. So I considered YQL but then … | |
I have a website that I have made. I am using friendly urls and I want to force use those in the URL bar. Current htaccess is [code] #Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule ^(gallery|upload|verify|contact|about)$ $1/ [R] RewriteRule ^(gallery|upload|verify|contact|about)/$ $1.php [NC] RewriteRule ^view/?$ view.php [NC] RewriteRule ^view/(molly|ms|es|misc)$ view/$1/ [R] … | |
Re: Is this on your local machine or on a web host? | |
Re: There is a property called 'min-height' but it doesn't work in IE8 or 7 and below. You can set that property in your css like, [code] #content { other properties; min-height: 600px; } [/code] Then you can use jquery if you really want to support old IE [code] <script language="JavaScript" … | |
Re: Displays fine on my computer. its 100% page width and height. And what text are you talking about? | |
Re: [code] date = input('Input date in format YYYY-MM-DD') hypCount = date.count('-') [/code] easy enough. No reason for a while loop | |
This is just a dumbed down version of my web application. I successfully did an on submit earlier but deleted it somehow. So I deleted everything not essential to make sure nothing interferes. If I remove the submit part, it appends just fine. I am a noob with jquery, help … | |
Re: [url]http://www.w3schools.com/PHP/php_mysql_select.asp[/url] That should be able to go more indepth than a simple explanation. | |
| |
![]() | Re: I don't see your issue. Perhaps you could paste the whole html or link to the image? ![]() |
Re: Pure HTML and CSS? I don't think so. You would have to do a javascript or php snippet I believe. If this is a static page with no dynamic content, then yeah you can do it easily. But if it is dynamic, I don't think so. | |
Re: I cannot access my mysql part of my computer at the moment but this should work [code] $names = mysql_query('select * from TABLENAME', $connection); $ArrayOfNames = mysql_field_name($names); $ArrayOfNamesReversed = array_reverse($ArrayOfNames); $last = $ArrayOfNamesReversed[0]; print($last); [/code] ![]() | |
Re: [code] #open tray eject #close tray eject -t [/code] May need drive name appended. | |
Re: When you say validation, where are you trying to do the validation? I get no errors when trying to validate. | |
Re: I believe this is what you are looking for. [code] dog_name = 'charlie' dog_bread = 'pug' dogs = [] dogs.append((dog_name, dog_breed)) print(dogs) [/code] to get the data [code] Dog1 = dog[0] Dog1Name = Dog1[0] Dog1Breed = Dog1[1] print(Dog1, Dog1Name, Dog1Breed) [/code] | |
Re: [CODE]<audio src="source of file" autoplay> Non html5 here </audio> [/CODE] I believe that is the syntax | |
I need help vertically aligning an image inside of a div. I have tried all various methods found on the web. I have tried table display, line height, etc. The page can be viewed at [url]http://seekretgarden.tk/view/0/[/url] . The red background is the display area of the image allowed by the … | |
I have code the goes to a page and downloads information on its update. Every once in a while it errors out with [code] url2z = url2z.read() File "/usr/lib/python3.1/http/client.py", line 502, in read s = self._safe_read(self.length) File "/usr/lib/python3.1/http/client.py", line 594, in _safe_read raise IncompleteRead(b''.join(s), amt) http.client.IncompleteRead: IncompleteRead(15928 bytes read, 37182 … | |
Basically I have an irc bot that connects to irc and listens to commands. Imports all of its functions from it. Here is some sample code with comments on what happens So my question is: how can I pass all of the information required to send irc information without reconnecting … | |
Can someone explain to me why this sort is going all wonky on me? And a how to fix would be cool too. Thanks [code] >>> a = ['2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '2', '3', '4', '5', '6', '7', '8', … | |
Re: Might be best to post this in the snippets part | |
I have been told by a number of people to use xpath instead of regex for some of my regex searches. What advantages does xpath provide over regex? I can't find a webpage that says that. Been through over 10 pages of search so far. | |
Re: [code] if(!isset($variable)) echo 'null'; or if($variable) echo 'null'; [/code] Becareful using the second though, if the variable has a value of zero it will say null. | |
Re: For log in text just do a simple if statement [code] <?php if(($username == $adminusername) && ($password == $adminpassword)) { echo 'Admin area'; } else { echo 'Login area'; } ?> [/code] Same goes for the page information stuff [code] <?php $page = $_GET['page']; if($page == 'home) { display home … | |
Re: Save it as a string and then eval it. It may impose security problems though, so don't quote me if this is the bad way to do it. [code] acts={"north":'print("You can't go that way.")', "east":'print("You can't go that way.")', "south":'print("You can't go that way.")', "west":'rm_b(acts)', "take sandwich":inventory.append(descriptions.sandwich[0])} [/code] Then just … | |
Re: Yes, you can. If you mean on submit, you can. But just stand alone, no. This is just a simple example of course [code] <?php if(isset($_POST['id'])) { $input = $_POST['id']; if (preg_match('/[^0-9]/', $input)) { $error['id'] = 'Id contained non numbers'; $bad_style = "style='border: 1px solid red;'"; } } ?> <html> … | |
Re: Why can't you just define the css file like normal? And if your file's name is template, the include is looking for the css file in admin/css/ | |
Re: I am using the latest version of firefox on linux and those links are default purple with an orange hover. I don't see any issue. Did you paste the wrong code or something? | |
Basically I have to create a website for this community project our class in school is doing. It is coded in entirely php and html because I hate writing javascript. Cut to the chase, there is a photo gallery and a semi-secret log in that you can log into for … | |
I may have phrased the title wrong but it is what I mean. I am not looking for multiple windows at once, I am writing a script that opens a tkinter window asking for information etc etc etc and it all saves into a database after the last window. Right … | |
I have this IRC bot that I am hard coding from scratch just for kicks. In it I pasted all of my functions to a separate file so that it saves spaces on my eyes when I code the mainframe. So on my imports I have: [code] import socket, re, … |
The End.