199,114 Archived Topics
Remove Filter ![]() | |
Do I understand that by using the following code [CODE] a = getchar(); b = getchar();[/CODE] , after pressing "1" and "Enter" keys ( Enter - to continue programs work), we can derive the following variables - [CODE]a = '1'; b= '\n';[/CODE] thanks in advance)) | |
I'm supposed to define a function that removes all nodes with a specified value from a linked list. I have to use this structure: [CODE=c] typedef struct LIST { int Object; struct LIST *Next; } LIST; [/CODE] and here is the function I wrote [CODE=c]void LDeleteElem(LIST **List, int Elem) { … | |
I know you can, [CODE]frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);[/CODE] but is there a way to get it to execute a method and then exit? example.. [CODE]frame.setDefaultCloseOperation(saveData, JFrame.EXIT_ON_CLOSE);[/CODE] just a guess? thanks all | |
I've been working on a project lately that is written in python and I want to incorporate mysql into it. The python code is basically a sales report writing system in which every sales report will have it's own number such as 10-0001, 10-0002 and will contain customer information like … | |
Hi, I am pretty sure there is a more effective way of achieving this. Would love for some input from you guys. Basically, I have a class called GamePanel and it contains this: [CODE] SpaceShip spaceship = new SpaceShip("Galatar"); public void paintComponent(Graphics g) { Graphics2D g2d = (Graphics2D) g; g2d.drawImage(bgI,0,0,null); … | |
ok, below is the code that i have tried and still not working; #include <stdio.h> int main () { char Name; int Age; int Date_Of_Birth; float Place_Of_Birth; float Email_Address; printf ("Name:"); scanf ("%c",&Name); printf ("Age:\n"); scanf ("%d",&Age); printf ("Date Of Birth:\n"); scanf ("%d",&Date_Of_Birth); printf ("Place Of Birth:\n"); scanf ("%s",&Place_Of_Birth); printf … | |
Salam, lets say I have declared: [code=c]int* array=new int[SIZE];[/code] (I used this array as if it was a 2D array - lets say that I'll consider these dimensions: row, column). and I want to pass this array to a function that will fill the array row by row. (The function … | |
Hey all, I need some help on this program cause I'm stumped. Everytime I compile this program is gives me an error of either "cannot find symbol" or "int cannot be dereferenced". I'm still playing around with the code but I might have to put the other class in a … | |
/*1st - What I want to do is have the user input 2 numbers. Program should determine which is lowest and highest, then spit it out. Then I’m trying to have the user input a 3rd number that is equal to or in between the lowest number and highest number. … | |
Hi, I had a site developed by me in coldfusion using which customers can raise online orders here.But i have some problem with cookies because everytime when user delete cookies in their system they have to register again to access the page.I have to delete the previous userid also from … | |
I am building a website that connects to a mysql database. When I include the file that holds the connection to the database I get an error message. If I write the code in each page the connection works fine and displays records held in database. Here is my code; … | |
I've been writing a pig latin translation program for a week in class now and i've gotten so far but now i don't know what to do. i need to check if the word has a vowel as the first letter then only add ay in the end if it … | |
I have a website which dynamically gets images and then displays it but i have sub image which has to update the main image, but this main image is a lightbox which uses href link so i am wondering if someone can show me how to update this href using … | |
Hi All I need help in making a Drop down search box I have dropdown HTML code and also Search Box HTML code, could you please help me in making both as one I made sample code but not sure why its not working, please do the need full [CODE]<HTML><HEAD><SCRIPT … | |
The program below is executing fine but when I enter the last of 10 numbers and the final output(shows the average of the 10 numbers) is displayed, I get the following error message: Run-Time Check Failure #2 - Stack around the variable 'numbers' was corrupted. If someone could explain what … | |
I am using VS2008, OS win vista. i am in the process of coding an application that would tab automatically (this is just an example, not the code i am intending to do). So basically, what i expect is to write a C++ code that could press the 'tab' button … | |
I am using CODEBLOCKS and I am creating a program that performs basic operations like add, delete and insert on Doubly LinkList , My Program is working fine on older Turboc compilers. But when i run it on codeblock its causing problem when i try to delete a node. [CODE] … | |
I need to open a webbrowser using python watch the email and password populate in the form, programmatically submit the form and keep the cookies while navigating through the web site. Any help would be greatly appreciated. | |
i'm new to array. we were given this exercises to be solved: but i have question about [I][COLOR="Green"]letters of ten elements[/COLOR][/I], [I]array integer which is called [COLOR="green"]totals[/COLOR][/I], [I]contents of the character array called [COLOR="green"]words[/COLOR][/I], arrays elements and a lot of stuff that seems to be going with it. thank you. … | |
Using VbScript:: I have a list of several different prices and I'm trying to figure out how to round these 5 decimals adding zeros if necessary. For example: I want 2.84 3.1 4.896 to look like 2.84000 3.10000 4.89600 Can somebody please help me? Thanks! | |
[code=c] #include <cstdlib> #include <iostream> static void fillArray(int **array); int main() { //allocating a 2D array int **array; array=new int*[10]; for(int i=0;i<10;i++) *(array+i)=new int[5]; //sending this array to a function fillArray(array); for(int i=0;i<10;i++) for(int j=0;j++;j<5) std::cout<<array[i][j]; for(int x=0;x<10;x++) delete[] array[x]; delete[] array; return 0; } static void fillArray(int **array) { … | |
What is the difference between int and unsigned int? | |
So i've been working on this code that i got online and it is a chat server code. This is the code- [CODE]# import needed modules: from socket import * # get sockets, for well, sockets import string # string functions import time # for sleep(1) function # define global … | |
A - an interface. B,C,D - implement A. in an other class, say X, i have an array of A, that will hold some B, C, D. i have a method that get (int i, A a) and put the a in the i place of the array. ->>>> how … | |
I'm developing an ordering system relying on PHP and MySQL; the problem I have is essentially HTML, though, and specifically with Google Chrome (no issue with Firefox or IE). If an order already exists for a customer, items are listed with input boxes but with the maxlength attribute (a variable … | |
Error 1 error C2440: '=' : cannot convert from 'const char [2]' to 'char' [CODE]bool word(char *Filename){ int r,number,length; ifstream file; file.open(Filename); file>>number; srand ( (unsigned)time ( NULL ) ); r=rand() % number+1; string input,word; for(int i=0; i<r; i++) getline(file,input); length=input.length(); for(int l=0;l<length;l++)word[l]="_"; cout<<input<<endl<<word<<endl;; return true; }[/CODE] | |
Hi guys hope your all well, im having a problem with a register page on my website, Dreamweaver is saying there are no syntax errors, but when the information gets submitted, the check page isnt doing anything :( This is the code i have: [code=php]<?php session_start(); include_once"includes/dbconnect.php"; if ($_POST['Submit']){ $user … | |
I'm doing a practice project to save golf statistics. It will display different data using tables. I wanted to run it through a jar file. But when I exit, obviously all of the data in my arrayList is gone. Any ways to save the arraylist? thanks a lot, -10100 | |
Hi! I want to join 2 strings, but it has been impossible. I have this: [code] i = socket.Receive(buffer); recibido = System.Text.Encoding.UTF8.GetString(buffer)[/code] Buffer contains: "C:" I want to add the "\\" to the string so i have tried to do: recibido = recibido + "\\". But no way, when y … | |
what is worng with this code [CODE]#include<iostream> #include <graphics.h> #include <stdlib.h> #include <stdio.h> //#include <conio> int main(void) { /* request auto detection */ int gdriver = DETECT, gmode, errorcode; int midx, midy; int radius = 100; /* initialize graphics and local variables */ initgraph(&gdriver, &gmode, "C:\\Dev-c++\\include\\graphics.h"); /* read result of … | |
Hi Guys, As the title says really... Sounds simple, it is. But....! I'm dealing with huge numbers here. I'm dragging bandwidth from a logging system I am developing for a client and it returns it in BYTES... Very accurate :| This is the sort of number I'm dealing with here... … | |
Helllo there I am new to programming i am trying to update my checkbox column in a gridview (asp.net)which i cont I can able to get the data 1 or 0 in database and able to update the checkbox as checked or unchecked my code is [code] <asp:TemplateField HeaderText="Available" SortExpression="Available"> … | |
Hi, If I run the following mysql_query: [ICODE]SELECT * FROM products WHERE product_name LIKE '%SOM%'[/ICODE] I get the following results: [INDENT]SOM 1 - Coloured option SOM 2 - Magnetic Roof Sign SOM 4 - Magnetic Roof Sign - Centre L SOM 6 - Magnetic Roof Sign - Curved Top SOM … | |
Hello everyone .. Im learning PHP on my own .. I installed Apache on Windows XP and trying install PHP, tried both installer and manual way but its not working :( PHP scrips getting downloaded .. Can any one give me a good link for step by step installation ? | |
Using Borland C++ 3.0 Here's my code: [CODE] #include<iostream.h> #include<conio.h> int main() { int m,d; int i=0; clrscr(); cout<<"\nEnter Birthday month: "; cin>>m; cout<<"\nEnter Birthday day: "; cin>>d; cout<<"\n"; { if(m==3 && d>=21) cout<<"ARIES!"; else if (m==4 && d<=20) cout<<"ARIES!"; else if(m==4 && d>=21) cout<<"TAURUS!"; else if(m==5 && d<=21) cout<<"TAURUS!"; … | |
I have this script and i need some help [CODE]<script type='text/javascript'> numcount=0; t=setTimeout("test()",30000); document.getElementById("incrementBtn").disabled=false; timer_on = 1; function increasecounter() { timer_on = 1; numcount++; document.getElementById('countdiv').innerHTML=numcount; t=setTimeout("test()",30000); } function test() { if(timer_on) { timer_on=0; document.getElementById("incrementBtn").disabled="true"; document.getElementById("score").innerHTML = document.getElementById("countdiv").innerHTML; } } function reset() { timer_on = 0; numcount=0; document.getElementById("incrementBtn").disabled=false; document.getElementById("countdiv").innerHTML = 0; … | |
I am writing a JavaScript program that you click the mouse on a button and it shows how many times you have pressed the button. here is the JavaScript for it [CODE]<script language="javascript"> var numcount=0; function increasecounter(){ numcount++; document.getElementById('countdiv').innerHTML=numcount; } </script>[/CODE] and here is the html: [CODE]<div id='countdiv'>0</div><br/> <input type=submit … | |
[B][U]Hi, this is kind of silly request, can anyone help me with these three C++ progs[/U]:[/B] [B]I - Predefined number of operation Calculator[/B]: [U]e.g[/U]. 5 + 12 - 3 10 / 3 - 5 /12 The program should ask for the following 1- number of operations 2- the equation for … | |
Hi all, I basically want to create a personal (probably password protected) webspace to which I can easily save images to, similar to svpply.com and ffffound.com. The way they work is that you create an account, you get a link which you keep in your bookmark bar and when you … | |
Hello All, I am trying to solve maximum flow, and I am experiencing some problems formatting the output. Here is some pseudocode I am trying to implement. c [u, v] is capacity from u to v, f [u, v] is the flow, cf [u, v] is the residual capacity. for … | |
hello, I'm a newbie to opencv. I'm doing a project using c++ and I use opencv for image processing. So for that I need to capture two video streams at the same time. before doing processing part I try to display both videos from cameras on two windows. But it … | |
Ok I have a little problem.I have a pointer in the struct which I don't know how to use as or move the information into an array on the bottom function. Need an explanation. Anyone please help... [CODE] // This is the minimum functionality for this exercise // Notice that … | |
Guys I am trying to add an image to the window I created, but I get an error message when I run my code: [CODE]import wx class my_window(wx.Frame): app=wx.PySimpleApp() def __init__(self, parent, id): window = wx.Frame.__init__(self,parent,id,'Window', size=(600,400)) window.SetIcon(wx.Icon('porcupine.ico', wx.BITMAP_TYPE_ICO)) if __name__ == "__main__": frame=my_window(parent=None,id=-1) frame.Center() frame.Show() app.MainLoop()[/CODE] The message I … | |
I'm working on a scientific/algebraic calculator and I have put all of the code that will deal with any of the math in a separate class. However I cannot access any of the controls on the form from this class. I need to write the answer into the box on … | |
I want to create a project on Genetic Algorithm using java for the msc final year..so how i can start to create a project.. | |
Hello there, I'm working on a project and for this I'm using classes, in my main I'm using an array of objects. When I compile it, it works fine, but when I try to enter values, it displays this message: "Exception in thread "main" java.lang.NullPointerException at main.main(main.java:25)" Here is my … | |
Hi All, I am new to sql and also this is my first post in this THREAD, Inline with this I am going to improve knowledge on sql, so below is my query which i desperately needed and don't know it is possible or not? I've Two table Table1: ProblemGroup … | |
hi, I have a windows forms application with one exe and several dlls(Class libraries) in a single solution. The application uses common data that is used across all the dlls. I would like to load the data when the application is starting up and use the loaded data at various … | |
Hi everyone! So here's my problem: Given an element, I need to get the index of the array in an array of arrays. For example, I have the following array of arrays: [CODE] my @arrOfArr = ( [ "1023", "1472", "0751651"], [ "1527", "1167", "2496111" ], [ "M167", "1412", "1761683" … | |
EDIT: I found the solution already. I had to malloc() memory for rec_msg. :) Hi, I've got a little problem with my (unix) C program. I'm trying to make a HTTP request to fetch a page from a site. I can resolve the IP, make a socket, connect and send … |
The End.