199,114 Archived Topics
Remove Filter ![]() | |
Hi all, FIrst I have to say my experiences with C++ are very low. But since we're given an assignment to develop a simple game in C++ now I have to try it out. But I have the basic idea on OOP and programming. So friends where should I start. … | |
This is my program import java.util.*; class Triangle { public static void main(String Vinod[]) { int i,j,n; Scanner sc=new Scanner(System.in); System.out.print("Enter a height of triangle : "); n=sc.nextInt(); for(i=1;i<=n;i++) { for(j=1;j<=i;j++) { System.out.print("*"); } System.out.println(); } for(j=n;j<=1;j--) { for(i=j;i<=1;i--) { System.out.print("*"); } System.out.println(); } } } I dont know what … | |
Hi all, i have installed jdk1.7 , now i want to set the class path.. because i am compiling my program its giving an error.....javac is not recognized as an internal or external commond. please help me to set the class path.......and how to able to run my program. | |
I am using the following code for receiving information from users, **is it possible to get all the information as a PDF attachment ?** protected void Button1_Click(object sender, EventArgs e) { SmtpClient smtpClient = new SmtpClient(); MailMessage message = new MailMessage(); message.To.Add("admin@domain.com"); if (CheckBox1.Checked == true) { emailadd.Text = employeenameDropDown.SelectedValue; … | |
>> I googled the dinference between bitwise and logical operators, but i could not understand exactl what it is. Can you simply explain ? | |
Heloo,this wil be my first post here, the reason for that is I can't figure this one out by myself public class Client extends Thread{ Socket socket = null; ServerResponse sr = null; private class serverResponse extends Thread{ InputStream in = null; public serverResponse(Socket socket) throws IOException{ if (socket == … | |
![]() | Hi again and thanks in advance !Any help would be very appreciated cause i'm having a test tomorrow and i need some help! So i wanna have a class called Bag and a subclass Set.In bag we have 2 constructors, an insert function , getsize function , getsum (which adds … |
import java.util.Scanner; public class SwitchStatement { private String courseName; private int total; private int gradeCounter; private int aCount; private int bCount; private int cCount; private int dCount; private int fCount; public SwitchStatement(String name){ courseName = name; } public String getCourseName(){ return courseName; } public void displayMessage(){ System.out.println("Welcome to the grade … | |
Hi I am creating my first webpage using DreamWeaver CS5.5. I am trying to work on a contact me page and I want the submit button to automatically send me an email with the information provided in the form. I have found a lot of stuff on the internet on … | |
main.c #include <stdio.h> #include <stdlib.h> #define MAX_USERS 100 typedef struct Utilizadores{ char *login; char *pwd; } USERS; void ReadUsers(USERS user[]); int u = 0; int main(){ USERS user[MAX_USERS]; ReadUsers(user); return 0; } void ReadUsers(USERS user[]){ FILE *fp; fp = fopen("/home/Jiwe/Desktop/users.txt", "r"); while(fscanf(fp, "%s[^=]=%s\n", user[u].login, user[u].pwd) != EOF){ u++; } fclose(fp); … | |
i am using MySQL database. i have one field PurchaseDate. i want following result e.g. : PurchaseDate between May-2010 and Aug-2011 pls help me to solve this problem. its urgent. thanks in advance.... | |
G'day. I get this error when I go to some other page, or redirect to index.php Warning: Cannot modify header information - headers already sent by (output started at /hermes/web05/blubbz/register.php on line 33 CODE on register.php: <?php if (isset($_POST['register_email'], $_POST['register_name'], $_POST['register_password'])) { $register_email = $_POST['register_email']; $register_name = $_POST['register_name']; $register_password = … | |
Hi forum, I was not really sure where to post this topic, but I need help in deciding what to do with my education. As of right now, I am finishing my associate's degree in computer science, and I decided that I wanted to transfer this degree into a game … | |
Hello, I'm trying to get results from a mysql database based on values in an array. My tables look like this 1. id | articles | thumbs | etc 2. tag_id | tag_name | article_id I'd like to get related articles based on the tags for that particular article. So … ![]() | |
can anybody explain with details how to calculate the factor of a number ? i m trying to do this with while statement. how can i do this ? please... | |
hey how to clear the screen in c++ i m using dev c++. clrscr()doesnot work | |
Hi again, all--- I'm trying to write a function that will add two matrices and output the resulting matrix. I've got two matrices already and everything, now i just need to write the function that i can use to call in my switch loop (The program must read two matrices, … | |
How will I implement colors in a console application developed using C++? What are the color codes of different colors? | |
Hi, I have a matrix of size of n x m, how can the file be read without any given size, thus making it possible to be read with any given size matrix?. Here is the scenario, I have a matrix of size 3 x 2 then someone wants to … | |
Hello, I am trying to create a Login system, so far it writes users correctly however it doesn't seem to be reading it correctly as it always claims the username/password is incorrect even though when I check the file it is. Could someone help, thanks! class TestLogin { public: char … | |
Hello I am looking to read a file into a 2d array to show which spaces have been taken/ haven't taken whiey will show a # if not taken and a T if taken, so far I just have a text file I created which shows like this: T # … | |
hello everyone..i'm trying to create a simple window using Win API in visual studio 2010 using the code below #include <Windows.h> LPCTSTR g_lptstrClassName="myWindowClass"; LRESULT CALLBACK WndProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam) { switch(msg) { case WM_CLOSE: DestroyWindow(hwnd); break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hwnd,msg,wParam,lParam); } return 0; } int WINAPI … | |
I have a command lline script that works perfectly. cat <some_filename> | awk '$9 == 200' | awk '$10 == 10623720' | awk -F\" '{print $6}' | sort | uniq -c | sort -r I want to put this in a shell script so that we do this for multiple … | |
Hello everyone, I have 2 issues that I've been trying to solve for days now 1. I'm trying to display an error message if a user tries to purchase more quantities of an item than what are actually available 2. I can't figure out how to decrease the actual in … | |
Hi, I am using WAMP on Win7 and my root folder is obviously `c:\wamp\www\` On same computer I use `http://localhost/project/` to run my project. The question is how do I run same project on other machine which is on same network? Also I rather use a bit human friendly naming … | |
i posted earlier this week about getting around codes in large projects. someone told me to install phpDocumentor and it will give the architecture of the software. i though, i should give it a shot, because im wasting my time searching instead of doing. the thing is, phpDocumentor doesnt work. … | |
First of all I learnt how to do this from http://nehe.gamedev.net/tutorial/playing_avi_files_in_opengl/23001/ AVIStreamGetFrameOpen is always returning NULL. I checked to see if I could open the AVI file in windows media player and that worked, so that means it can't be a codec problem, right? I'm not too sure. All the … | |
Who can help me with the following. a part of my code doesn't work and i do not know wy. <?php //from here it is working $con = mysql_connect("localhost", "bla", "bla"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("wordpress", $con); $sql1 ="CREATE TABLE IF NOT EXISTS stamboom_landen … | |
![]() | By opaque binary i mean so that people cannot see the source code if they open the file in their text editor, so instead of seeing: print "You cant see me!" it would be something like: "0101010001010101001001010" And yes, i am trying to do this with python. |
Hi guys Actually i have problem to convert my C++ program to C! Because C is too old and unusable, i tried to find and read so many sources, but finally i got some errors. Anyone can help me?! Thanks Regards C++ Files: Main.cpp #include <iostream> #include <cstring> #include <cstdlib> … | |
Hello. I am working on a windows form right now. My form is very full and i am using many textures. I have double buffered my form and made exteded classes for anything with a texture that has double buffering. Before i had double buffered everything my form was very … | |
I'm using Eclipse c++ and when I run a program it says: launch failed. Binary not found. how can i fix this? | |
I want to know how to create our own file, such as: (.Docx). If we opened the file in notepad the characters contained in the that's file could not understand, so i would like to know by what method of making the it's file? Is the file created and use … | |
HWND hwndt; hwndt = FindWindow(NULL,"Windows Task Manager"); here FindWindow funnction not work in c language its returns NULL yes i know i can use first perameter also but i wanna use second perameter titel in this function i use dev c++ compiler and also add to project user32.a lib tell … | |
When i Connect to Mysql using TURBO C++,im getting error unable to open include file mysql.h mysql_version.h mysql_con.h mysql_time.h i added the include files and set path . even then im getting error . help me :( | |
| |
Hi there, I am making a spell checker program with php with words stored in mysql. I use it to check unicode languages. But I do not get good suggestions with similar_text with percentage above 82. But if I decrease this percentage, I get many useless words. How can I … | |
I have this C++ network client program but it has an error. Here is the error: error C2664: 'wsprintfW' : cannot convert parameter 1 from 'char [128]' to 'LPWSTR' Here is the code: // Client program example #define WIN32_LEAN_AND_MEAN #include <winsock2.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #define DEFAULT_PORT 2007 … | |
I was trying to reduce my jtextfield height, since it is for user to enter first name. somehow when i run the code, the box is just too big, is there anyway to change the textfield height? i tried with setPrefferedSize but somehow it showing error, mayb i put it … | |
I am new in Perl and generally in programming. I face some real problems here. I need a Perl script that can open a text file, read a series of URLs, get the content of the pages and save it to another file. Thanks deeply for any guidance. | |
error Please select an imageError: Duplicate entry '' for key 'img' ` //file properties $file = $_FILES['image']['tmp_name']; if(!isset($file)) echo "Please select an image"; else { $image = addslashes(file_get_contents($_FILES['image']['tmp_name'])); $image_name = addslashes($_FILES['image']['img']); $image_size = getimagesize($_FILES['image']['tmp_name']); if($image_size==FALSE) echo "That's not an image."; else { { if(!$insert = msql_query("INSERT INTO shop (id, img, … | |
Hi, I've just finished my c++ class (mechanical engineering) and as the final exam we have to create a simple program with graphical user interface and I need some help from you guys. T**he task is this**: we have to make a simple GUI that can take the diameters of … | |
<?php session_start(); error_reporting(0); ?> <?php ob_start(); ?> <?php include("connect.php"); $u_name = $_POST['email']; $u_pass = $_POST['pwd']; if ($_POST['Submit']=='Login') { $sql = "SELECT * FROM user WHERE username = '$u_name' AND password = '$u_pass'"; $result = mysql_query($sql) or die (mysql_error()); $cmd=mysql_fetch_array($result); $num = mysql_num_rows($result); if ($num) { $_SESSION['username'] = $u_name; echo '<META … | |
Hi ive made a code where a user makes a list and then displays it. he may also delete objects one by one. suppose i wished to clear all in one go. How would i go about doing this? thank you in advance. my code is below. all works except … | |
for some reason iam not getting the right map. i think the problem is x += 130; y += 130; #include "DarkGDK.h" const int ROWS = 10; const int COLS = 13; int level[ROWS][COLS] = { {1,1,1,1,1,1,1,1,1,1,1,1,1}, {1,0,0,0,0,0,0,0,0,0,0,0,1}, {1,0,0,0,0,0,0,0,0,0,0,0,1}, {1,0,0,0,0,0,0,0,0,0,0,0,1}, {1,0,0,0,0,0,0,0,0,0,0,0,1}, {1,0,0,0,0,0,0,0,0,0,0,0,1}, {1,0,0,0,0,0,0,0,0,0,0,0,1}, {1,0,0,0,0,1,1,0,0,0,0,0,1}, {1,0,0,0,0,1,1,0,0,0,0,0,1}, {1,1,1,1,1,1,1,1,1,1,1,1,1} }; void DarkGDK(void) { … | |
I have a starting query that displays appointments and I am trying to expand to get different statistics: SELECT apt.user_id, apt.appt_id, apt.client_id, apt.time_start AS stime, FROM_UNIXTIME(apt.time_start,'%Y-%m-%d') AS ftime FROM tl_appt apt LEFT JOIN tl_rooms r on r.room_id = apt.room_id WHERE apt.appt_id IS NOT NULL AND apt.appt_status_id = '3' AND FROM_UNIXTIME(apt.time_start,'%Y-%m-%d') … | |
[Click Here](http://img196.imageshack.us/img196/3873/captureiv.jpg) for the snapshot of my problem. string operand; string opCode; struct MacroNameTable{ string macroName; int start; int end; int invocation; string operandCounter; }; struct MacroNameTable NAMTAB[NAMSize]; void addNAMTab(){ NAMcounter++; cout <<"check NAMcounter: ["<<NAMcounter<<"]"<<endl;//debug cout <<"check this operand: ["<<operand<<"]"<<endl;//debug cout <<"check this opCode: ["<<opCode<<"]"<<endl;//debug NAMTAB[NAMcounter].macroName=opCode; NAMTAB[NAMcounter].start=DEFcounter; NAMTAB[NAMcounter].operandCounter="AA"; } operand … | |
![]() | How can you get an `if` statement in another `if`, for instance: $line = <STDIN>; if $line eq "\n") { print "You did not type anything } else { print "You said: $line"; } Could you put another` if `next to the place where it says: You said: blah like … ![]() |
I've created a web application page with login and session login basically a <?php session_start() ?> do I really need to put this code on every page of my php ? because session login only active on the first page after I do login.. Anyone.. Help me on this.. Thanks |
The End.