132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for jeyjey223

i watched this tutorial video [url]http://thenewboston.org/watch.php?cat=14&number=13[/url] and for some reason it doesn't work.. it says time is undeclared for some reason [CODE]#include <stdio.h> #include <conio.h> #include <stdlib.h> int main(void) { int i=0; srand(time(NULL)); while (i<200) { printf("%d\n", 1+rand()%6); i++; system("cls"); } system("PAUSE"); return 0; } [/CODE]

Software Development c++
Member Avatar for deceptikon
0
106
Member Avatar for sc0tty

I am new to python and cant figure out what I am doing wrong with the global variables. Here is an example of the problem I am having. number = 0 def test(): global number number = raw_input("Please type a number.") def prints(): global number if number2 != 1: print …

Software Development python
Member Avatar for sc0tty
0
210
Member Avatar for jot121

here is the details I got: 1. Create a class called 'GuessMyNumber'. The constructor should chose a random number between 1 and 100. There should be a method 'guess(int guess)' that returns -1 if the guess is too low, 0 if the guess is correct, and 1 if the guess …

Software Development java
Member Avatar for NormR1
0
217
Member Avatar for ulxlx

I'm probably missing something really obvious, but I downloaded the Python 2.72 release, and now I can't figure out what to do. I've tried googleing it but everything says to just install it. Is that install the setup.py file? If it is, how do I run a python file if …

Software Development python
Member Avatar for ulxlx
0
335
Member Avatar for RLS0812

It's going on 4 hours now, and I have yet to find an answer on how to do this. All I want to do access and manipulate data in a list, from another class. The 2 classes: [B]GetList.java[/B] [CODE]public class GetList { public static void main(String args[]) { MakeList xx …

Software Development java
Member Avatar for FALL3N
0
309
Member Avatar for collin_ola

Hi, I have a database with lots of fields, some of which are still empty and are to be filled in at a later stage. Is there any way of writing an IF statement (or any other method) that will allow these empty records to be 'shown' in my textboxes …

Software Development microsoft-access vb.net visual-studio
Member Avatar for collin_ola
0
443
Member Avatar for phorce

Hello :) (Too many questions about this)! Basically, I'm trying to display the contents of a matrix without using "cout" in my class. (It's a bad method) I've tried to return an array, but, that failed miserably.. So I've got a method in my class: [code] double Matrix::read(int theRow, int …

Software Development algorithm c++
Member Avatar for ravenous
0
118
Member Avatar for MasterHacker110

I have been programming in C++ for a while now. I heard about RSA Encryption algorithm, and i have read many online sites on how it works. But i still cant grasp how the algorithm works. i have tried to make programs with RSA, but they doesnt encrypt. If you …

Software Development c++ encryption
Member Avatar for Moschops
0
332
Member Avatar for saneeha.nust

I have written the following code for creating a file and it works fine... string dirAddress = "C:\\FTPTrace\\" + ipHeader.DestinationAddress.ToString() + ".txt"; System.IO.StreamWriter logfile = new StreamWriter(dirAddress,true); Now I want to add ip address of the local machine in the path... as... string dirAddress = "\\192.168.15.96\\C:\\FTPTrace\\" + ipHeader.DestinationAddress.ToString() + ".txt"; …

Software Development
Member Avatar for thines01
0
168
Member Avatar for mayankshri

Hi i am open a word file 2007(.doc file) in a rich text box through open dialog box. It works fine but images and bullets are not shown in a rich text box. i want to open open word file with images and bullets in a rich text box. I …

Software Development c# file-system microsoft-office
Member Avatar for thines01
0
420
Member Avatar for dilse4sk

hi every one. i am making a booking app in vb.net and im using sql server as my database. i am confused about table creation. I have increment of 1 in customerid which is primary key in customer table. Suppose if a customer books a room and according to the …

Software Development sql vb.net
Member Avatar for kingsonprisonic
0
314
Member Avatar for Graphix

Hi everyone, I'm currently working on a cross-platform project to copy data from the computer onto a USB drive quickly. [B]Main problem: EOF in the middle of the file[/B] It's going good so far, but I stumbled across a problem in my copy_file function: [CODE]int copy_file(char *source_path, char *destination_path) { …

Software Development c file-system
Member Avatar for Graphix
0
2K
Member Avatar for Thropian

I started making a simple drawing program, to use for a level maker, and I came across a slight issue [CODE]from Tkinter import * class Main: def __init__(self,root): w,h = root.winfo_screenwidth(), root.winfo_screenheight() current = {} canvas = Canvas(root, width = w, height = h, bd=0) canvas.pack() root.overrideredirect(1) root.geometry("%dx%d+0+0" % (w, …

Software Development python tkinter
Member Avatar for Thropian
0
177
Member Avatar for radiat

I'm studying enumeration at the minute and i've a quick question. In the following code using enum, are you limited to ouputting the sequence number of the possible values, or can you use the enum operator to output the text "green"? [CODE] #include <iostream> #include <sstream> #include <fstream> #include "conio.h" …

Software Development c++
Member Avatar for Ab000dy_85
0
186
Member Avatar for 69MASTER

Hey i'm trying to place a ship onto my grid but my translation function is trying to iterate over None type, if someone would write a simple horizontal ship placement in translation function i'm sure i can finish the rest, thank you! [CODE]class start(object): def __init__(self): self.GameT = int(raw_input("One Player …

Software Development python
Member Avatar for woooee
0
437
Member Avatar for Sturdy

Hi all, How can i validate a text in text box? I need to check that text length is 7 and first four characters is contain "ABCD" and last three characters must contain numbers. e.g : ABCD123 Thank you.

Software Development visual-basic
Member Avatar for Sturdy
0
1K
Member Avatar for general07z

Hello, This code is for (hospital management system). This code allow you to add patients. There are two types of patients. which is: 1. Normal patient. 2. Critically ill patient. once you added any patient. You will be able to show all patient using "ShowAllPatient;" method. -> i want the …

Software Development c++ data-structure queue user-interface
Member Avatar for WaltP
0
2K
Member Avatar for phorce

Hello, basically I want to return an array from a function (So I don't output things in the class - just main) But I seem to get the error: "invalid types 'int[int]' for array subscript" Here is the code: [code] #include <iostream> using namespace std; int matrix() { int matrix[10] …

Software Development c++
Member Avatar for phorce
0
205
Member Avatar for sinatra87

I normally don't try to get outside help on homework that is still due, but I've kinda' hit a wall on this one. I'm trying to write a program that dynamically creates a list of scores for a group of students. It has to ask the user how many students …

Software Development c++
Member Avatar for sinatra87
0
247
Member Avatar for TIM_M_91
Member Avatar for TIM_M_91
0
96
Member Avatar for Sturdy

Hi all, How do i know where the cursor position in the text at textbox? Anyone know how to do this? Thank you in advance

Software Development visual-basic
Member Avatar for Sturdy
0
4K
Member Avatar for riahc3

Hey I want to use something like Dreamweaver to design a HTML page. (Excluding all the links to pictures and such) how do I get Java to get all that and convert it to a well designed PDF document like I was seeing in Dreamweaver? Thanks

Software Development html-css java pdf
Member Avatar for peter_budo
0
318
Member Avatar for tharindupro

can I know how to play a video,from a JAVA program

Software Development java video
Member Avatar for JamesCherrill
0
246
Member Avatar for phorce

Hello.. I'm doing a project that involves searching/matching 2 matrix's. The basic idea: Matrix 1: 0 1 0 1 0 1 0 1 0 1 1 1 1 0 1 Which will then be interpreted in memory as: 0 1 0 1 0 1 0 1 0 1 1 1 …

Software Development algorithm c++
Member Avatar for mrnutty
0
107
Member Avatar for tomexlfc

Hi, I want to make my staff id text box only accept upper case letters and not lower cases, please how do i go about it? I wrote these lines but they stil dont work: [CODE]Private Sub txtStudID_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtStudID.KeyPress txtStudID.Text.ToUpper() End Sub[/CODE] …

Software Development vb.net
Member Avatar for tomexlfc
0
277
Member Avatar for dalia_24

Write a C-Sharp code to make a “Matrix”. User must be asked to enter the following information: Size of the matrix and values. The program must compute the following operations: 1. sumMatrix (return the sum of all the values of array) 2. averageMatrix (return the average of all the values …

Software Development
Member Avatar for thines01
0
111
Member Avatar for alexbnc

I want to get the information downloaded from a file (a BMP image) into a char array. I have this function [CODE] #define _countof(x) (sizeof(x) / sizeof(x[0])) char* DownloadBytes(char* szUrl) { HINTERNET hOpen = NULL; HINTERNET hFile = NULL; char* data = (char*)""; DWORD dataSize = 0; DWORD dwBytesRead = …

Software Development c++ file-system
Member Avatar for alexbnc
0
335
Member Avatar for DanWebb3148

[CODE]sizeA = 2**28 M = [0]*sizeA[/CODE] The above code creates an array but, each element is 4 bytes each. How do create a large byte array with type 'B' (eight bits unsigned)? I would like it to be as large as possible. I need it for a sieve prime number …

Software Development python
Member Avatar for DanWebb3148
0
973
Member Avatar for newbie14

I have socket connection which keep reading data and then it will send it via a queue for next processing in another thread. I notice at times it just stop sending data to the queue. I will print this System.out.println("\n\nSending TO QUEUE : "+message); and stop but I do not …

Software Development java queue
Member Avatar for JamesCherrill
0
377
Member Avatar for ryklon

Hello! So here I am again asking for your knowledge and help.:$ I have this little project of embedding the g++ compiler in my software. What I have done so far is place the compiler inside the bin of my project folder, inside the Debug folder. I managed to call …

Software Development vb.net visual-studio
Member Avatar for ryklon
0
180
Member Avatar for devin2203

I needed to implement a simple cyclic graph in Java so it have nodes in such a way that it can be implemented to represent adjacency matrix or list. Any advice or resources to hep me start implementing this would be much appreciated! Many Thanks

Software Development java
Member Avatar for NormR1
0
392
Member Avatar for bigzos

Hey Guys, I am trying to create this application which can display the free space and the total space of logical drives,,I am very close but there is some little mistake which I am not being able to find out..Please help,,here is the code [CODE]Public Class Form2 Private strDrive As …

Software Development vb.net
Member Avatar for bigzos
0
148
Member Avatar for n3red

Hi. I have a small dilema. I have 1 Picassa .ini file a contacts.xml file and a few images all in the same folder. On the images there are certian people, picassa.ini file holds the image name and id's of people included on that image in such format: [CODE][img_8538.jpg] faces=rect64(4ac022d1820c8624),d5a2d2f6f0d7ccbc …

Software Development python xml
Member Avatar for wortelkoek
0
233
Member Avatar for dsmith12

So my code is suppose to get information from the user and figure out how much funding the two professors get. My code runs twice but for some reason only the last entry is saved and outputted and my formula for calculating the new funding only outputs zero for some …

Software Development java java-swing oop
Member Avatar for stultuske
0
220
Member Avatar for skannigan

Hi, just a quick question. if i have an input file with 6 lines of data. for example(ingnore the numbers 1 to 6, they indicate the file number and is not part of the file physically) 1. Peter 3 / + - * 2. Dahne 8 + - / * …

Software Development c++ file-system
Member Avatar for Ancient Dragon
0
212
Member Avatar for swissknife007

[CODE] #include <iostream> #include<stdio.h> #include<string.h> using namespace std; int main() { // cout << "Hello world!" << endl; int t,i,j,a,flag; char str[1000001]; cin>>t; while(t--) { a=1; scanf("%s",str); for(i=0;i<=strlen(str);i++) {flag=0; if(!isdigit(str[i])) {flag=0; for(j=i-1;isdigit(str[j]);j--) { if(str[j]!='0') { flag++; a*=str[j]-'0'; //cout<<"flag"<<flag<<" "<<a<<"A"<<endl; break; } } if(flag==0) { a=0;break; } } while(a>9) { if((a%10)!=0) …

Software Development c++
Member Avatar for StuXYZ
0
523
Member Avatar for dbsp

I've read many threads on how to remove a new line character '\n' using fgets()-- however, how would one go about removing a new line character simply by using getchar() ?

Software Development c
Member Avatar for deceptikon
0
3K
Member Avatar for zekstein

I need some help here.. I need an example to do that : ( a background task ) #includes blablalbalbla void?? ExecuteTask () { while(1) { cout << "first " << endl; } } int main () { ExecuteTask( ); while( 1 ) { cout << "lol" << endl; } …

Software Development c++
Member Avatar for zekstein
0
189
Member Avatar for zEuSsE

Hi all! I'm using mac os X (intel core duo 2) and I'm quite new in assembly coding. I've got this problem: I'd like to read a file in USB memory using assembly. Does anybody know how is it possible? And more in general can you give me some links …

Software Development assembly os-x pc-peripheral
Member Avatar for zEuSsE
0
334
Member Avatar for PythonIsCool

For school I have to write a program that requests a 3 part name and breaks it into a first, middle, and last name. I wrote the code but the alignment of my output is not right. I was wonderng if someone can tell me what I did wrong and …

Software Development python
Member Avatar for TrustyTony
0
170
Member Avatar for cutterpillow20

Good day, can you give me some sample program that hold string in 3 dimensional array.. because our instructor didn't expound the discussion about multidimensional array then is it useful in our final project this semester..Hoping for reply Thank You

Software Development c
Member Avatar for cutterpillow20
0
366
Member Avatar for jefferson9

I'm using a BackgroundWorker object to start a process, the following is inside of my BackgroundWorker.DoWork event: [CODE] ... process.StartInfo.FileName = "process.exe"; process.StartInfo.Arguments = arguments; process.StartInfo.UseShellExecute = false; process.StartInfo.CreateNoWindow = true; process.StartInfo.RedirectStandardOutput = true; process.EnableRaisingEvents = true; process.OutputDataReceived += new DataReceivedEventHandler(p_OutputDataReceived); process.Start(); process.BeginOutputReadLine(); while (process.HasExited == false) { if (worker.CancellationPending …

Software Development
Member Avatar for Cameronsmith63
0
693
Member Avatar for riahc3

Hey I have a folder in my current working path and I want to make a copy of a file inside it to the the current working path. Its kind of a dumb question, I know, but how do it do it? Thank you.

Software Development java
Member Avatar for riahc3
0
210
Member Avatar for riahc3

Hey I have this following code: [code] try { // Connection props Properties props = new Properties(); props.setProperty("mail.smtp.host", host); props.setProperty("mail.smtp.starttls.enable", "true"); props.setProperty("mail.smtp.port", "25"); props.setProperty("mail.smtp.user", usuario); props.setProperty("mail.smtp.auth", "true"); // Prepare the session Session session = Session.getDefaultInstance(props); // Constuct the message MimeMessage message = new MimeMessage(session); /*Test*/ message.setHeader("Content-Type", "multipart/mixed"); message.setFrom(new InternetAddress(CorreoOrigen)); message.addRecipient(Message.RecipientType.TO,new …

Software Development email java pdf session
Member Avatar for riahc3
0
208
Member Avatar for Tango2010

Hi All, I wonder if anyone can help - I have been teaching myself Java GUI programming using a Mac running OSX Lion and Netbeans 7, and have followed the tutorial: [url]http://netbeans.org/kb/docs/java/gui-functionality.html#Exercise_2[/url] When I run the program, it builds and compiles fine, but only appears when I choose the command …

Software Development gui java java-netbeans
Member Avatar for Tango2010
0
157
Member Avatar for Esmerelda

[code]main() { int a=5; a=++a + ++a; printf("%d",a); }[/code] the output is 14..how come?

Software Development c
Member Avatar for WaltP
0
295
Member Avatar for mohamed moamen

I'm send sound between two clients via UDP server Socket , How i can make users not feel the delay of sound ?

Software Development java
Member Avatar for JamesCherrill
0
92
Member Avatar for Shodow
Member Avatar for Shodow
0
108
Member Avatar for shean1488

Hi everybody. I have a class Sudoku. And puzzle stores 2D array of type Cell. [CODE]public class Sudoku implements Iterable<Cell []> { private Cell [] [] puzzle;[/CODE] What I want to do is to iterate through the puzzle in different class (SudokuValidator): [CODE]public class SudokuValidator { private Sudoku puzzle;[/CODE] how …

Software Development java puzzle
Member Avatar for JamesCherrill
0
124
Member Avatar for Alientcp

Hello, Im new to c# and i have a little problem. I have a folder with 5 text files (group1,group2, etc), each contains a list of names. On my form, I have 2 combo boxes. I want the first one to allow me to select a group (a text file), …

Software Development
Member Avatar for Alientcp
0
2K

The End.