97 Posted Topics

Member Avatar for Carian

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 …

Member Avatar for macneato
0
162
Member Avatar for JameB

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"); …

Member Avatar for JameB
0
880
Member Avatar for EddieC

[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 …

Member Avatar for JameB
-1
897
Member Avatar for Drkhrs620

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> …

Member Avatar for JameB
0
261
Member Avatar for JameB

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 …

Member Avatar for rajarajan2017
0
81
Member Avatar for virspy

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 …

Member Avatar for JameB
0
77
Member Avatar for baseballfury
Member Avatar for JameB

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 …

Member Avatar for Nick Evan
0
107
Member Avatar for JameB

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) …

Member Avatar for Coyboss
0
101
Member Avatar for icu222much

[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 …

Member Avatar for hao001
0
207
Member Avatar for jiten_raulo

[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 …

Member Avatar for jiten_raulo
0
142
Member Avatar for aodpreacher

[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) …

Member Avatar for mrnutty
0
103
Member Avatar for JameB

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 …

Member Avatar for vmanes
0
130
Member Avatar for JameB

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 …

Member Avatar for JameB
0
5K
Member Avatar for plato_03

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; …

Member Avatar for mrnutty
0
139
Member Avatar for JameB

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; …

Member Avatar for JameB
0
152
Member Avatar for justin105

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.

Member Avatar for JameB
0
677
Member Avatar for Mental1ty

Take the Computer Science course if your school offers one. That is the best place you can start from. Good luck!!

Member Avatar for JameB
0
148
Member Avatar for C.c

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 …

Member Avatar for ithelp
0
118
Member Avatar for satasonic

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); …

Member Avatar for JameB
0
6K
Member Avatar for onecarloz
Member Avatar for Dr Stupid

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 …

Member Avatar for JameB
0
134
Member Avatar for renovat0

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") { } …

Member Avatar for renovat0
0
110
Member Avatar for Antun

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 …

Member Avatar for JameB
0
121
Member Avatar for iammfa

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." …

Member Avatar for JameB
0
105
Member Avatar for jko2326

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 …

Member Avatar for VernonDozier
0
322
Member Avatar for kernel>panic

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 …

Member Avatar for JameB
0
139
Member Avatar for atch

[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....

Member Avatar for Narue
0
138
Member Avatar for DIDL

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 …

Member Avatar for JameB
0
74
Member Avatar for koculan
Member Avatar for JameB

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 …

Member Avatar for JameB
0
149
Member Avatar for JameB

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 …

Member Avatar for Yiuca
0
136
Member Avatar for SallyJ

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)

Member Avatar for ArkM
0
2K
Member Avatar for gretty

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!!!

Member Avatar for siddhant3s
0
1K
Member Avatar for sabian4k

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 …

Member Avatar for siddhant3s
0
203
Member Avatar for Monkey.D.Luffy
Member Avatar for nhamyl

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) …

Member Avatar for JameB
0
3K
Member Avatar for neox183

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; …

Member Avatar for neox183
0
136
Member Avatar for jam7cacci

Why not just use the sort function?? [url]http://www.cplusplus.com/reference/algorithm/sort/[/url]

Member Avatar for jam7cacci
0
176
Member Avatar for JameB

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 …

Member Avatar for nucleon
0
151
Member Avatar for JameB

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) …

Member Avatar for JameB
0
188
Member Avatar for JameB

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 …

Member Avatar for arshad115
0
161
Member Avatar for mguj1130

[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] …

Member Avatar for vmanes
0
680
Member Avatar for tpetsovi

[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 == …

Member Avatar for kbshibukumar
0
187
Member Avatar for 94SupraTT

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.

Member Avatar for tux4life
0
79
Member Avatar for JameB

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 …

Member Avatar for blacklight332
0
969
Member Avatar for JameB

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()); …

Member Avatar for GDICommander
0
134

The End.