97 Posted Topics
Re: You make a file called reset.css where you have your existing stylesheet and import that stylesheet before you import your actual stylesheet. Many browsers apply some "default" styles to the elements. When IE, Chrome, and FF apply differently, it shows difference. By resetting CSS you are creating an ideal environment … | |
I've implemented changing src of an image using javascript but I don't want any javascript in my website now. So I need help to do that in PHP! :) What am I doing: In the main index.php file, [code=xhtml] <body onload="load_images();"> [/code] Then I include a random file [code=php] include("content_to_display.php"); … | |
Re: [QUOTE=EddieC;1264089]Another Microsoft mobile fail: [url]http://www.pcworld.com/article/200258/why_microsofts_kin_phones_were_destined_to_fail.html?tk=hp_blg[/url][/QUOTE] According to your logic, all companies should stop making OS other than Microsoft. All TV manufacturers should just give up other than SONY and Samsung. All phone companies other than Apple and Google (very much new to this market) and so on? Although apple's iphone … | |
Re: You can put use the <button></button> tag around an image. [code] <BUTTON TYPE=SUBMIT> <IMG SRC="/this/leads/to/your/button/image/!!" HEIGHT="97" WIDTH="105" ALT="Starflower" ALIGN="ABSMIDDLE"><STRONG>Keep this blank or not...</STRONG></BUTTON> [/code] Difference Between the <input> Tag and <button> Tag: At first glance, it may appear that there's not much difference between using the <button> tag and <input> … | |
For my website, I have set up a very basic and nooby email service. It will take the message and write it to a text file. However, I want to set up the email so that it will send the message as an email to [email]___@___.com[/email]. How do I do … ![]() | |
Re: Try This: [CODE=php] function getipaddress() { if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ip = $_SERVER['HTTP_CLIENT_IP']; } else if (!empty($_SERVER['HTTP_CLIENT_IP'])) { $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } else if (!empty($_SERVER['REMOTE_ADDR'])) { $ip = $_SERVER['REMOTE_ADDR']; } else { die("If you are receiving this message, please contact the webmaster at ______________"); } return $ip; } [/CODE] This code … | |
Re: This can easily be fixed by setting the width and height to that of the picture. | |
I just made a program that takes input from the parallel port(or printer port) of a computer and translates that input to English/Numbers. Its a Morse Code Transmitter translator and a Morse Code Calculator. Anyways, so I have to write a writeup about the program and I am kinda confused … | |
Hey everyone, So I am doing this computer engineering class project where we have to use a parallel port of a computer to read inputs and make a program that acts according to that input. The project is to make a high rise building(or a mini city in my case) … | |
Re: [QUOTE=icu222much;985288]Thank you. Is there an IDE that you would recommend a noob that doesn't need me to put in the cin.get (); code?[/QUOTE] [B]Microsoft Visual C++ Express Edition[/B] (Free) or you can pay for it. But, since you are new, you are no where close to needing to pay for … | |
Re: [QUOTE=jiten_raulo;957193]I spend 6 to 7 hours each day practicing c++ and visual c++ but end of the day I think I don't have any Test or homework. Please anyone can provide with some site helping with the same. Thanks in advance JIten[/QUOTE] There is a list of problems in this … | |
Re: [url]www.wcipeg.com/judge[/url] Try that website. Although, it doesn't teach you the algorithms but it has A LOT of problems for you to solve! Good Luck!! P.S. I am not advertising, its a non-profit website run by a bunch of computer science students. EDIT: Do the lower point problems first (3 pointers) … | |
HI, I was trying to learn more about I/O with files in C++ and I can't figure out why this program can't output to the file... [code=cplusplus] #include<iostream> #include<string> #include<fstream> #include<algorithm> using namespace std; char userinp; void print_interface() { cout << "Enter E to Encrypt" << endl << "Enter D … | |
Hi, is there any function or algorithm that can completely remove a string array element? For example, string mystring = 'x', 'xx', 'xx', 'xxx'; if I want to remove 'xx' and I know the position of 'xx' in the array, I want this : mystring = 'x', 'xxx'; Anything? I … | |
Re: Here is something: [code=pascal] uses crt; var i, ii, control, divcount, count : integer; begin clrscr; readln(control); for i := 1 to 30000 do begin for ii := 1 to i do begin if(count=control)then begin readln; exit; end; if (i mod ii = 0) then divcount := divcount + 1; … | |
Hello, I am new to Java programming and I just got the NetBeans IDE. One problem that I've been having with Java is the input. [code=java] package learning; public class Main { public static void main(String[] args) { int num1 = 0, num2 = 0; cin >> num1 >> num2; … | |
Re: Have you thought of using a photo cell(or a solar cell) and a laser(visible or invisible)? It can also be used to detect movements. If it suits your needs, then programming and other things can be so much easier! Just a thought. | |
Re: Take the Computer Science course if your school offers one. That is the best place you can start from. Good luck!! | |
Re: I guess you just need to implement another option in your menus. Like "Press 3 to go to main menu..." then you can use goto ______; and what not... or you can think of something better. I don't get what you are trying to do though. If you are trying … | |
Re: When I was a beginer, I was doing random problems in Pascal. Here is one that might help you... [code=pascal] uses crt; var i, control : longint; input, sum : real; begin writeln('Enter the total number of inputs. Then, enter them one by one until you see an output.'); readln(control); … | |
Re: Length of a string can be found using _____.length(); {Fill the space with the name of the variable} You can then use a for loop to check every single character inside the string and compare it with one another to see if it repeats. While you are doing this, you … | |
Re: In C++, if you compare something like R WITHOUT any quotes, it interprets it as a variable. So, I assume that the user will enter R or r. If so, you need to check like if (input == 'R') { } or like this if (input == "stop") { } … | |
Re: I am not an expert and I don't fully understand the code there. But, I completed a game written in Pascal where I had to clear only selected pixels on screen. Like all the pixels between (25, 25) and (56, 56). What I used was clearviewport() in pascal, I did … | |
Re: 1. Since you are new to C++, I doubt you will really need to use that argc stuff but like that first post says, you can find information if you really need in that link. 2. "If you divide i by 7 and have the remaider 0 then do something." … | |
Re: Every thing that you can type or have displayed in the DOS shell has a certain number known as the ASCII value. What the problem is asking is "to display all the characters that can be represented in the given range." edit: cout << static_cast<char>(100) << endl; with iostream libray … | |
Re: The problem can be easiely solved by ROUNDING the output number to a certain degree. [code=cplusplus] #include<iostream> #include<iomanip> using namespace std; int main() { double i = 0.546546, ii = 2.365463847698; cout << fixed; cout << setprecision(3) << i * ii << endl; return 0; } [/code] edit :: Here … | |
Re: [QUOTE=atch;929698]Hi, I just wonder if this is possible: (semi-pseudocode (won't work as planned)) ofstream fout("my_file.txt"); fout << cout; Looking forward to your reply[/QUOTE] I don't think thats possible if I properly understand what you are asking.... | |
Re: If you don't know a lot in C++, why don't you start making simpler games like tic tac toe or Who wants to be a millionaire? As to how to make the games, well TTT is really easy. All you need is couple of if statements and while/for loops. for … | |
Re: soryy, please delet this?? | |
Hello, I am new webmaster for my high school's robotics team and I don't understand why the pages load differently in IE8 and FireFox. [url]http://www.team188.com[/url] is the website... Ok, so here is what the problem is : When I open certain pages in IE8, the area around the curve on … | |
My laptop keeps shutting down when I try to turn it on. It will always stay on until the XP's loading screen appears(the screen where there is a bar kinda thing that makes it look like its loading). It does turn on sometimes but after when it shuts off, I … | |
Re: An easy way to solve this problem is by find the slope of the three lines and checking if any of the slopes happen to be negative reciprocals of the remaining two... Slope(m) = (Y2 - Y1) / (X2 - X1) | |
Re: The distance(d) between any two points on a graph is d = sqrt( ( (x2-x1)^2 ) + ( (y2-y1)^2 ) ) [url]http://www.1728.com/distance.htm[/url] Might help you!!! | |
Re: I think what you are asking is how add number as long as 100 000 digits. I think the algorithm you are talking about is basically you developing a piece of code that adds just the way you would add two numbers on a piece of paper. For example, you … | |
Re: You should try learning C++ at [url]www.cplusplus.com[/url] !!! | |
Re: I am not sure what exactly you want to do but, if I understand properly, you want to make sure that the char1 and char2 are always letters('a' to 'z' or 'A' to 'Z')? If that is what you want then all you need is a while loop. [code] while(1) … | |
Re: Why do you have to do something that complicated?? Here is what I came up with! [code=c++] #include <iostream> #include <string> using namespace std; int main() { string y; char x; cout<<"Please enter a string: "<<endl; cin>>y; cout<<"Please enter a character: "<<endl; cin>>x; cout << endl << endl << endl; … | |
Re: Why not just use the sort function?? [url]http://www.cplusplus.com/reference/algorithm/sort/[/url] | |
Can this program be shortened any further? I basicallly need to write a program that reads in two numbers and a char. eg. 10 + 10 then outputs its value.... The char can either be + or - or *. The number will always be less than 100. and you … | |
I am trying to write a program that given two integers in two strings, substracts the second integer from the first integer and outputs it. 1. I read in two strings. 2. I reverse them (I am also adding them, I found it easier to add if they are reversed) … | |
How do you find the length of an int array?? I have int array with some values and I need to count how many values are there? I tried a lot of things like strlen(); sizeof(); etc.. [code=c++] int main() { int iarray[10000]; // Now I have a lot of … | |
Re: [code=c++] #include <iostream> #include <iomanip> using namespace std; int main() { int count = 0, a; char first[99999], second[99999], sum[100000], carry; gets(first); count = strlen(first); gets(second); carry = '0'; for(a = 0; a < count; a++) { sum[a] = (first[a] + second[a] + carry) - '0'; carry = '0'; if(sum[a] … | |
Re: [code=c++] void IsPrimeNumber (void) { int Num, count; cout << "Please enter number to check if it's prime--> "; cin >> Num; cout << endl << endl; for (int x = 1; x <= Num; x++) { if (Num % x == 0) { count++; } } if (count == … | |
Re: You can make a variable and put it as the last line in your loop and output the variable that you created AFTER the loop has finished. | |
Hello, I am trying to create a program where I can work with an array of char that contain either 0 or 1 representing a decimal number that the user enters. Basically I need to convert a decimal number into binary and store it into a char array. I wrote … | |
Hello, I have a problem where I need to delete any occurrence of "~" from a string. I created a function but in the end, it only deletes half of the "~" and leaves the other half.... [code=c++] string goodstring(string inp) { for (int i = 0; i < strlen(inp.c_str()); … |
The End.