132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for rjani1

Dear all, I am working on the code below: [CODE] int cookTime(int time) { int second, minute; for (minute = time; minute > -1; minute--) { for (second = 59; second > -1; second--) { sleep(1); printf ("%i", minute); printf (" : %i\n", second); } } } [/CODE] Now this …

Software Development c
Member Avatar for rjani1
0
1K
Member Avatar for D4n1sD

Hello, I got a problem while making a new program. I am trying to make an interactive menu from which people can choose the type of the table they want. So the source (I won't release all of it just the part I got the problem) [CODE] box[20][75]={ "__________________________________________________________________________", "| …

Software Development c++
Member Avatar for abhimanipal
0
90
Member Avatar for wilsonz91

Hi, If I were to write a program as follow: [CODE]if (x>90) cout<<"Excellent"<<endl; else if (x>80) cout<<"good"<<endl; else if (x>50) cout<<"average"<<endl; else cout<<"bad"<<endl;[/CODE] And i want to convert it to using switch case, how should i do it? I know how to use switch for constants like 1,2 and characters …

Software Development c++
Member Avatar for abhimanipal
0
148
Member Avatar for Tango2010

Hi all, Im trying to use a variable as a path in C. For instance, the user enters a directory and this is used with the '*.*' notation attached so the program loops all files in the directory. I've got the PHP part of this code working in a separate …

Software Development c file-system
Member Avatar for Salem
0
209
Member Avatar for Purnima12

[CODE]import time import calendar # time tuple/list index YEAR = 0 MONTH = 1 DAY = 2 WEEKDAY = 6 # weekdays MON=0 TUE=1 WED=2 THU=3 FRI=4 SAT=5 SUN=6 # months JAN=1 FEB=2 MAR=3 APR=4 MAY=5 JUN=6 JUL=7 AUG=8 SEP=9 OCT=10 NOV=11 DEC=12 HAVE_30_DAYS = (APR,JUN,SEP,NOV) HAVE_31_DAYS = (JAN,MAR,MAY,JUL,AUG,OCT,DEC) HAVE_28_DAYS …

Software Development python
Member Avatar for vegaseat
0
1K
Member Avatar for roll_in_k

Hi everyone.. Suppose i have a function : [B]void foo(int ind,float **ptr1,float **ptr2[/B]) that allocates memory using malloc .. - double pointers are much more in reality- I want to use this pointers in other functions too, but when i call them(functions) in main() .. memory leak message appears .. …

Software Development c
Member Avatar for roll_in_k
0
350
Member Avatar for Excizted

Hi. I have some, probably, very basic questions. :D I'm making an engine, which will be script driven. But I'm concerned with the performance of plain text, even if it was loaded to the memory. I want the scripts to be executable very fast, since there would be a lot …

Software Development c++
Member Avatar for Dave Sinkula
0
125
Member Avatar for niro_fernando

plz i want to know information about class libraries in C C++ Java .i want to know about History,how they work , etc

Software Development c++
Member Avatar for niro_fernando
0
96
Member Avatar for sexyzebra19

I've been struggling over this for hours, and just can't seem to figure out a formula for it. I'm trying to append below, (attach underneath) one matrix to the other. So for example, for Matrix A: 1 2 3 4 5 6 and Matrix B: 7 8 9 A.Append(B) becomes: …

Software Development c++
Member Avatar for sexyzebra19
0
95
Member Avatar for kangarooblood

tried to make this encryption program but it doesn't work, [B]I know[/B] I must have done something wrong, but I don't know how to correct it. A more effective solution to my "[I]if dWord is higher than 118[/I]" would be nice, thx for help:) [COLOR="Red"] here's the code![/COLOR] [CODE=c++] #include …

Software Development c++ encryption
Member Avatar for jonsca
0
175
Member Avatar for rotana

How can I connect to sql server via network by using vb.net.

Software Development sql vb.net
Member Avatar for TomW
0
99
Member Avatar for tqmd1

Numbers Only Textbox Dear Programmers I want to make a routine named “NumberOnly” [CODE]Private Sub TextBox4_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox4.KeyPress ‘Here I want to call the function as Numbersonly End sub[/CODE] All textboxes must accept numbers data on which I call this routine Supose I …

Software Development vb.net
Member Avatar for TomW
0
179
Member Avatar for devstarter

what is the difference between javaSE and javaEE? regards

Software Development java
Member Avatar for jwenting
0
53
Member Avatar for kashy!

Hi friendz, I completed a project in VB6 recently, its a database handling project, Problem is, I have created a SETUP with all its required files via PDW wizard, when I run that setup just before completing the setup there came a message that "System files are outdated" so I …

Software Development visual-basic
Member Avatar for kashy!
0
313
Member Avatar for bharatk

Hello I am trying to use Visual Tkinter but it's giving an "Invalid procedure call" error each time I try to place something on the form and the program closes. Screenshot of what I'm getting: [url]http://i48.tinypic.com/10zy5br.jpg[/url] I'm not even able to add a simple button to the form & when …

Software Development python tkinter
Member Avatar for macroasm
0
398
Member Avatar for geetajlo

How to make a combo box read only ? N wat is the code to deactivate it ?

Software Development vb.net
Member Avatar for kvprajapati
0
8K
Member Avatar for n_vcplus

Hello All, I've been through this article and found it very helpful {http://msdn.microsoft.com/en-us/library/bb250489(VS.85).aspx}. I have a 'static' callback method in my BHO dll which is called whenever 'some' event on the computer happens. I need to call a javascript method on all open browser instances when that happens (or do …

Software Development c++ java javascript web-browser
0
113
Member Avatar for cableguy31

I'm writing a shell script that can take zero to 2 user arguments. I have an if statement to check to see if any arguments were entered and then I have a case to enter the arguments into the correct variables. This all works great. Now, I want to add …

Software Development shell-scripting
Member Avatar for nvivek
0
165
Member Avatar for HBK_100

I am trying to read input form the user and then print them to a file but the compiler is giving me some error about invalid pointer at the fprintf statements [code]void addrecord(void) { struct custinfo info; FILE *customer; printf("\n\n\t\t\t PLEASE ENTER THE CUSTOMER INFORMATION BELOW"); printf("\n\n\t\t\t REGSISRTATION NUMBER"); scanf("%d",&info.regis); …

Software Development c file-system
Member Avatar for WaltP
0
118
Member Avatar for kotkata

[code] //this game is played with a six sided die, on each player's turn he may roll until he gets a 1 from the die, at which point, all points accumulated to that point are wiped, he may hold and add the accumulation to his score at any time. #include<fstream> …

Software Development c++ perl
Member Avatar for WaltP
0
284
Member Avatar for foco

I've been able to open text files, read them and write to them. However, I always have to specify the name of the file before I compile. IE: ofstream myfile ("example.txt"); I've tried to declare a string, and then use that where the name of the file would nomally be, …

Software Development c++ file-system
Member Avatar for WaltP
0
105
Member Avatar for Stack Overflow

Greetings, String parsing isn't always an easy task. Especially in cases where you need to split a single string into a great multitude, but also accounting for maximum performance. The following code presented does this task simply. Using precise allocation techniques perform greatly when writing an algorithm to precision.

Software Development algorithm c
Member Avatar for Ancient Dragon
0
2K
Member Avatar for BlinkOnly

I need to write a function that adds entered values to a sequence AFTER the current_index [CODE]void sequence::attach(const value_type& entry) { assert(size( ) < CAPACITY); size_type j; if (!is_item()) current_index=0; for (j=used; j>current_index; --j) data[j] = data[j-1]; data[current_index] = entry; ++used; }[/CODE] current_index is the position in the dara array …

Software Development c++
Member Avatar for WaltP
0
162
Member Avatar for fux0r

I need to create a christmast tree which takes R value from user then output on console a Christmas tree in which last part height equals R. The tree consists of triangles of heights from 1 to n.The shape must look like (for R=4) [IMG]http://img136.imageshack.us/img136/4862/christ.jpg[/IMG] thanks in advance...

Software Development c
Member Avatar for abhimanipal
0
115
Member Avatar for sgw

Here is the simplest program: [CODE]#include <iostream> using namespace std; int main() { cout << "hello" << endl; cin.get(); return 0; }[/CODE] When I ran it (using Dev C++), there is no output, just a blank screen. The problem seems to be from the "endl". If I delete it, or …

Software Development c++
Member Avatar for ppl154
0
141
Member Avatar for konata_89

the question is using pointer variable: a)write a program that receives a sorted array of integer.then it will read an integer value and insert that integer value in correct place (using pointer variable) -is it how im write the code right. b)improve the first program code by allowing the program …

Software Development c
Member Avatar for abhimanipal
0
129
Member Avatar for bogenbroom

I am writing a simple program to take a user-supplied file, read the contents, and output email addresses found in the file. If the user supplied an invalid path/file name, I want to prompt the user to try again. Right now, everything works properly if the first file name the …

Software Development c++ file-system
Member Avatar for bogenbroom
0
1K
Member Avatar for DogDee

Hi all I have a datetimepicker icon in my toolbox but when i try to add to the from in datagrid view it comes up with an error saying "Element not found" and when i click on the help icon in this pop up box it displays nothing. Forgive me …

Software Development visual-basic
Member Avatar for vb5prgrmr
0
83
Member Avatar for ne0_komodo

Okay friends this is actually my school work. My teacher asked me to make a diamond asteriks. I just try and with my code [CODE] #include<iostream> using namespace std; int main() { char b='*'; for(int i=10;i>0;i--) { for(int j=0;j<i;j++) { cout<<" "; } for(int c=10;c>i;c--) { cout<<b; } for(int a=10;a>i;a--) …

Software Development c++
Member Avatar for ne0_komodo
0
195
Member Avatar for DJPlayer

I'm scanning a file to see if user input matches a word in the txt file.. if it matches.. increase the array size and add the word. This is a 2d array. "max_word_size" is currently just a constant variable. [CODE]void UserMode(char userAnswers[][max_word_size], int *size) { FILE *fid = fopen("dict.txt","r"); char …

Software Development c
Member Avatar for DJPlayer
0
187
Member Avatar for fuggles

I am testing with HttpGet to simply see if it would download anything from my website, but the application crashes on startup. Anyone know why? [code=Java]package com.httptest; import java.net.URI; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import org.apache.http.client.methods.HttpRequestBase; public class httptest extends Activity { /** Called when …

Software Development android android-development apache java
Member Avatar for fuggles
0
104
Member Avatar for Yamazaki

I have a datagridview thats bounded to a db and bindingNavigator that has Add/Delete/Save buttons. When I select a row and delete it, the row gets deleted from the datagridview, but when I restart the application, it doesn't get physically deleted from the database. Search suggests putting this code inside …

Software Development vb.net
Member Avatar for Yamazaki
0
1K
Member Avatar for templersstorms

Ok. So in the following section from my XML document, I have two attributes in the Unit tag. The first, [I]type[/I], and the second [I]uname[/I]. I wish to click, say a button that says "Troop" on it, and the program will search through the XML file and find the entries …

Software Development dataset xml
Member Avatar for templersstorms
0
173
Member Avatar for Majestics

How to set caption icon in java? Like firefox icon on the top caption bar. and how to run a process in background in java? Thank you.

Software Development java
Member Avatar for jamesonh20
0
84
Member Avatar for bob10

Hi guys, I have a problem using GridBagLayout. I will paste my code here. You can run it. Sorry for the length :) I tried to comment it as much as possible. So there are three panels in this GUI. One left, one right, one south. The problem is only …

Software Development gui java java-swing
0
45
Member Avatar for btom14

I need help designing a method that finds the percentile of a value given the percentile rank. Here are the exact instructions: public double getPercentile(int p) This returns the value of the pth percentile. A value stored in the array is the pth percentile if it is greater than or …

Software Development java
Member Avatar for andydrewk14
0
149
Member Avatar for firebugg

Hi Everyone. I am working on an assignment with the following instructions... Enhance the DataSet class so that it can either be used with a Measurer object or for processing Measurable objects. Hint: Supply a default constructor that implements a Measurer that processes Measurable objects. I'm confused about how to …

Software Development dataset java
Member Avatar for firebugg
0
518
Member Avatar for TheWolverine

Hi all, I've spent the last week trying to sort this out, and the more I delve into it, the more confused I'm getting. I've done some background research (searched on google and here for sort function issues) and really I can't make head or tail of what's going on. …

Software Development algorithm c++
Member Avatar for dusktreader
0
4K
Member Avatar for ELBUF

Hey guys, Im making an uno card game and I think so far so good, however once I compile it, my program doesnt read any errors, but a box pops up stating "vector subscript out of range" and it is confusing me a lot. I think I can identify where …

Software Development c++
Member Avatar for ELBUF
0
2K
Member Avatar for tonymate

Hi all, Below is a program that continues to give me multiple errors when I ran it. I kept getting error which I don't know how to fix and where/or what I did wrong. I need your help. Please bear with me as you read through this because it is …

Software Development data-structure java queue
Member Avatar for dreamcode
0
283
Member Avatar for CppBuilder2006

why does this program have an exception in VC++ 2008 Express? [CODE] #include <conio.h> //#include <C:\WString(v2.00).h> #include <iostream> #include <string> using namespace std; class WCS { public: wchar_t* string; WCS(const wstring& wstr) { wchar_t* c = new wchar_t [wstr.size() + 1]; wcscpy(c,wstr.c_str()); string = c; } ~WCS() { delete [] …

Software Development c++
Member Avatar for CppBuilder2006
0
209
Member Avatar for Bladtman242

Hi guys, I have been searching the web a bit without success, perhaps I'm using the wrong keywords. Anywho, I'm looking for a way to monitor how many bytes are uploaded/downloaded from the computer, weather trough the winAPI or whatever, I would really appreciate any help on this :)

Software Development java
Member Avatar for Bladtman242
0
152
Member Avatar for A M R

i have problem in updating GUI from another thread my code gives me exception i debugged to find the reason of exception i found that it is here [ this part of Wedget class [code] if (display.thread != Thread.currentThread ()) { if (display.threadId != OS.GetCurrentThreadId ()) { error (SWT.ERROR_THREAD_INVALID_ACCESS);//hereeeee } …

Software Development gui java
Member Avatar for A M R
0
124
Member Avatar for A M R

Hi i wrote classes of content and label providers as illustrated here [url]http://www.vogella.de/articles/EclipseJFaceTable/ar01s05.html[/url] now i want to Bind my tableview with such list as it is done here with textfield and such strings [url]http://www.vogella.de/articles/EclipseDataBinding/article.html#swtdatabinding_dependency[/url] :-/ can i do that?

Software Development java
0
366
Member Avatar for InS@NiTy

I'm trying to a open a connection to a local database and no matter what I try it just won't work (I'm pretty new to SQL Server and VB for that matter) I tried using 'sqlconnection' with different connection strings but none of them worked or gave me any useful …

Software Development open-source vb.net
Member Avatar for InS@NiTy
0
825
Member Avatar for sexyzebra19

My program keeps crashing and I can't see why...pretty sure its something to do with creating matrix B since when I remove the commands to create matrix B it runs ok. Can anyone see what is wrong? Thanks in advance! I have the header file: [code=php] // matrixlib.h - A …

Software Development c++
Member Avatar for sexyzebra19
0
324
Member Avatar for Pezzy

Hello, I just started learning Java, and I'm having problems getting Kruskal's algorithm to work properly. While I have had more success implimenting this in C++, I'm still having issues there. I have a feeling my find() method may be the cause. I've been scouring the net trying to find …

Software Development algorithm java
Member Avatar for Pezzy
0
516
Member Avatar for johann_2

Hello, Could someone please look at this code and tell me why it is not working. I am trying to retrieve the number that is stored in the "Hundredths" section of the system time and output it to the screen. Thanks. [code] .MODEL SMALL .286 .STACK 100h .DATA Typed DB …

Software Development assembly
Member Avatar for NotNull
0
229
Member Avatar for MattBerry

I recently bought a nice shiney new laptop with widescreen 1080p. The problem is now when I compile the application and it is run on a non-widescreen monitor it displays incorrectly. In particular the controls that are anchored to the right and bottom are displayed too far off to the …

Software Development
Member Avatar for Diamonddrake
0
110
Member Avatar for Vitriolics

Hi, I used to have difficulty with more advanced bits of scope but eventually understood but after a long break from c++ i have of course forgotten bits. my problem is with this bit of code: [CODE]std::vector<int>::iterator it[/CODE] as i understand it this bit of code creates an iterator for …

Software Development c++
Member Avatar for Narue
0
120

The End.