132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for PM312

i have programe where i use serial number for each document number. now i want to start serial number with one againe in new financial year, but restarting number with one result in duplication of reference number in database. how to get this.

Software Development visual-basic
Member Avatar for PM312
0
147
Member Avatar for kannan_pahang

class Student { // data members private String _studentNumber; private String _studentName; private int _markForMaths; private int _markForEnglish; private int _markForScience; // Set Student Name public void setStudentName(String studentName) { _studentName = studentName; } // Set the student number public void setStudentNumber(String studentNumber) { _studentNumber = studentNumber; } // getNumber() …

Software Development data-science java
Member Avatar for JamesCherrill
0
128
Member Avatar for niyasc

Hi, I'm trying to make a simple applet that will display battery status using gtk+ . For that purpose I have written code given below. It continously check for battery status using acpi command and display it. Do you think that I have done things in proper way? I want …

Software Development c
0
194
Member Avatar for niallpaterson

Hi, I've never used bash before, but am creating a file. Here's the skelton: while read line; do if [ -e "$line" ] then else cat > $name << EOF EOF cat > rails << EOF EOF fi command $name & done < projects.txt The error is: "line 55: syntax …

Software Development ruby shell-scripting
Member Avatar for Watael
0
222
Member Avatar for triumphost

Why does the following code skip the initialization of values of the temporary created? Box::Box() : X1(0), Y1(0), X2(0), Y2(0), W((X2 < 0 ? -X2 : X2) - (X1 < 0 ? -X1 : X1)), H((Y2 < 0 ? -Y2 : Y2) - (Y1 < 0 ? -Y1 : Y1)) …

Software Development c++
Member Avatar for Milton Neal
0
231
Member Avatar for poloblue

Good Afternoon, I'm having some problems with a problem that deals with raising the power of an integer. So far I have this code. #include <iostream> #include <cmath> using namespace std; int main() { int num, bigNum, power, count; cout << "Enter an integer: "; cin>>num; cout << "What power …

Software Development c++
Member Avatar for mike_2000_17
0
281
Member Avatar for poloblue

Hi, I trying to let the user input how many numbers that they want to average and outputting the average of those numbers. I have this code, but not working as aspected. #include <iostream> using namespace std; int main () { int numCount, total; double average; cout << "How many …

Software Development c++
Member Avatar for triumphost
0
219
Member Avatar for sammoto

I'm trying to add the int values of Integer objects within an ArrayList, using a recursion (for the first time). Here's what I have so far: import java.util.Scanner; import java.util.ArrayList; public class SumArrayList { private static int calculateSumArrayListHelper(ArrayList<Integer> duplicate) { if (duplicate.size() == 0) { return 0; } int lastNum …

Software Development java
Member Avatar for curiousgeorgem
0
3K
Member Avatar for triumphost

I'm a bit confused atm, I don't know when to use const T& or T& or T as a parameter. Currently I'm doing: void Resize(std::vector<T> &Vec, const size_t &NewLength) //Ahh edited the function as a result of Lucaci's answer. { Vec.resize(NewLength); } //But thinking of doing: void Resize(std::vector<T> &Vec, size_t …

Software Development c++
Member Avatar for mike_2000_17
0
3K
Member Avatar for Testa

Hi all! Is my first post here and well, im very new with python (just aroun 10 days). I did the famous "Guess my number" game. (Python pick up a number and user must guess it). All right, i have not problems with this. But now im trying in the …

Software Development python
Member Avatar for Testa
0
214
Member Avatar for sammoto

Hi again, I posted last week about a Go Fish game that I was trying to write - well I've sorted out my past issues and now I'm trying to rewrite my CardPile class (that defines such things as the deck or a player's hand) to consist of an ArrayList …

Software Development java
Member Avatar for sammoto
0
447
Member Avatar for minsu44

Well this is not so much of a need, but i really want to learn how to do error handling assembly language[TASM] Basically if the user just types or presses enter the code will go back to the same question with probably a message box or writing stating that they …

Software Development assembly
Member Avatar for ShiftLeft
0
315
Member Avatar for trishtren

Hey, Iv been looking around google for the past few days to find ways to embed python 3.2 into my c++ application. I however want interpeter to be compiled into my application, so i can merely distribute one exe file without relying on the user to install python. However the …

Software Development c++ python
Member Avatar for TrustyTony
0
286
Member Avatar for ashine80
Member Avatar for silvercats

What does main() function do in?wtz da difference between void main() and int main()?why should I use? extra two questions :- what first two lines, #include <iostream> using namspace std; do? thanks

Software Development c++
Member Avatar for silvercats
0
874
Member Avatar for poloblue

Good Afternoon, I'm having trouble process 2-D arrays to store and process data. I have problems with implementing the void grading function and void showgrades function So far I have this code: Cpp file: #include <iostream> #include <fstream> #include <string> #include <cstring> #include <cmath> #include <cstdlib> #include <iomanip> #include "lab_20_head.h" …

Software Development c++
Member Avatar for poloblue
0
1K
Member Avatar for XodoX

I was told you can access the index of an array and save it in a variable. Like, as you know, every element is referenced by an index number. 0,1,2,3,4 etc.. I don't want to save the content, I need the index number. I will need to know the position …

Software Development c++
Member Avatar for triumphost
0
173
Member Avatar for Archuom

I have a file info.txt like below NAME ID=karan PLACE=Mumbai AGE=23- PHONE=1234 HANDICAP=No- OCCUPATION=Student NAME ID=Ravi PLACE=Goa AGE=25- PHONE=4567 HANDICAP=Yes- OCCUPATION=Employee I want to read the file with make them into record strings as below "NAME ID=karan PLACE=Mumbai AGE=23 PHONE=1234 HANDICAP=No OCCUPATION=Student" "NAME ID=Ravi PLACE=Goa AGE=25 PHONE=4567 HANDICAP=Yes OCCUPATION=Employee" Please …

Software Development c++
Member Avatar for Lucaci Andrew
0
922
Member Avatar for Dudearoo

**Dudearoo** *Useing Code::Blocks* ok, ive got a somewhat simple error that i cant crack, First heres my code. #include <iostream> #include <cstdlib> #include <stdio.h> #include <time.h> #include <conio.h> #include <stdlib.h> #include <iomanip> #include <windows.h> // so to use strcmp #include <cstring> #include <fstream> using namespace std; int main() { ofstream …

Software Development c++ file-system ios
Member Avatar for Lucaci Andrew
0
651
Member Avatar for pendo826

0 down vote favorite I am currently making an application to store employee details such as name, id and email address. I am doing this using a HashMap. I am currently having difficulty with a searchByName,id and email address methods. How would i go about writing one ? Here is …

Software Development java seo
Member Avatar for JamesCherrill
0
1K
Member Avatar for kannan_pahang

Create a class named Student (class definition program). The class contains: • Private attributes to store values of Student name, Student university and Student mark. • A method named initialize() to assign initial value to the Student name, Student University and Student mark as specified in the parameter. • A …

Software Development java
Member Avatar for JamesCherrill
0
105
Member Avatar for efth

I recently left Python behind to pick up Java. In Python, a variable defined in a function could not be called outside of the function. But you could at least let the function return a value, which could be a variable defined in the function. When a variable is defined …

Software Development java python
Member Avatar for jLocke
0
255
Member Avatar for Flowerlady

I know zilch about electronics, that is why I am on this site, because I have a problem. I do R & D in the world of Metaphysics, and my specialised subject is Subtle Energies. Normally in this field we have to use things like Pendulums, stick pads, muscle testing …

Software Development c++ os-x
Member Avatar for mike_2000_17
0
141
Member Avatar for reallyslick

The first problem is this: I want to create a LinkedList of type_A. type_A will contain a LinkedList of type_B. The below code fails at compile saying: Node_B does not name a type. The only way i see around this is to create different LinkList.cpp files for each type (such …

Software Development c++
Member Avatar for Ancient Dragon
0
175
Member Avatar for Skate Bart

Okay, so here's my problem. I have a MS Hierarchical Flex Gird Control [fgdCompany] which is used to display records that are taken from a database. Everything works great but not the Delete button. What the delete button is supposed to do is when a record is selected in fgdCompany, …

Member Avatar for Skate Bart
0
231
Member Avatar for Skate Bart

hey there, Here's my complete code for a delete button that deletes a record in a Heirachical Flex Grid. Dim rsTour As New ADODB.Recordset Dim cn As New ADODB.Connection Dim strSQL As String cn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;" & _ "Data Source=" & App.Path & "\Luckshan Tours & Travels.mdb;" & _ "Persist …

Software Development open-source sql visual-basic
Member Avatar for Skate Bart
0
409
Member Avatar for Viped

Hi, I have a external class with paint(Graphics g) method and the class itself is working great. I can get it visible by launching it from my launch class by doing add(new Laatikko()); but when I am trying to get it work from third class it wont show up. Basicly …

Software Development image java java-swing
Member Avatar for Viped
0
295
Member Avatar for ashine80
Member Avatar for TrustyTony
0
161
Member Avatar for ashine80
0
194
Member Avatar for ashine80

To Check Whether the Given Point P is inside a Triangle or Not..

Software Development c
0
138
Member Avatar for Massa3332

public class QueueAsArray implements Queue { protected int[] myArray; int count, size, rear = 0; public QueueAsArray(int newSize) { myArray = new int[newSize]; size = newSize; count = 0; } public void purge() { int index = 0; while(count > 0) { myArray[index] = 0; index++; count--; } rear = …

Software Development java queue
Member Avatar for JamesCherrill
0
216
Member Avatar for Emad Saber

*i have a vb.net application that plots 16 plots immediately, the plots data are realtime. the 16 plots must draw the points at the time they receive them (must be no delay), to do that 1- i made a timer with ticks at 50 ms. 2- at each timer tick …

Software Development vb.net
Member Avatar for Emad Saber
0
134
Member Avatar for daino

I'm a little confused about how to go about creating a wrapper class? I think I need to start with the basics. What I want to do is write a C++ wrapper class for a C API. I know several of you could explain this well but I need to …

Software Development api c++
Member Avatar for daino
0
4K
Member Avatar for cyberjoe

Hello, I would like to ask you about using Team foundation Server as bug tracking system. Already we are using Countersoft Gemini, this is one of many bug tracking application. Because we started to use repository and build from Team Foundation Server, we consider also migrating bug tracking system to …

Software Development vb.net
Member Avatar for iFrolox
0
169
Member Avatar for iEpic

For my final project I have to develop a functional flowchart and write a menu-driven Java program, using control constructs and user-defined functions. My question is, what the heck is a menu-driven program?

Software Development java
Member Avatar for godzab
0
553
Member Avatar for werydude

Hi. I'm a python noob who codes for fun, so please only critize me if you're trying to help. I'm on python 2.7 and built this code for fun. (dont ask what the questions are mean. its private info) Start = True while Start: print "Would you like to play …

Software Development python
Member Avatar for TrustyTony
0
519
Member Avatar for HTMLperson5

Well, in python I was planning to do something like this: >> echo text text >> But I just cant find a way to do it! I know that for user input i will use `input()`, but how do I get it to echo the text specified?

Software Development python
Member Avatar for Gribouillis
0
330
Member Avatar for TrustyTony

Do not miss http://www.daniweb.com/community-center/geeks-lounge/threads/424660/code-snippet-contest

Software Development python
Member Avatar for Ene Uran
0
208
Member Avatar for n1csaf3

I am having some difficulty's locating an issue within some code I am working on. It breaks when it runs the "if (AIwords->name == NULL)" // This is the struct which is located in the header(.h) struct AIstruc_word { char *name; bool controlStatement; struct AIstruc_word *next; }; // This is …

Software Development c++
Member Avatar for ravenous
0
156
Member Avatar for skondgekar

# I have Written a code for sine function but it is not much accurate# I have written a code for PI() and sin() function but it is not much accurate I want to make it more accurate can anybody tell how can I make it more accurate. Also I …

Software Development c++
Member Avatar for mike_2000_17
0
1K
Member Avatar for hassan980

Hello, Im trying to design a module in which, using an equation, x and y coordinates are found and i want to display them in a list box. The general idea in my mind is that the program asks the user to enter the length and number of divisions (lets …

Software Development vb.net visual-basic
Member Avatar for hassan980
0
223
Member Avatar for MasterHacker110

I have this code, but when i type in one comand and then the next comand it does doe the comand i type in but the first comand i typed in. * I think it is becuase i dont clean my vector string, if so how do i clean it. …

Software Development c c# c++
Member Avatar for MasterHacker110
0
243
Member Avatar for sarathsshanker

//ArrayListEx(main class) import java.io.*; import man.Phone; import man.Person; import java.util.*; public class ArrayListEx{ public static void main(String[] args){ Person p= new Person(); p.setName("yo"); ArrayList<Phone> pList = new ArrayList<Phone>(); Phone ph = new Phone(); ph.setOne("dasd"); pList.add(ph); System.out.println("sgs "+pList); } } My Program has a Person,Phone and ArrayListEx(main class) classes,Person contains an …

Software Development java
Member Avatar for sarathsshanker
0
2K
Member Avatar for HibaPro

hi everyone, can some one tell me how i can generate a crystal report dependeing on some sending value from datagrid view, or there is a method to do to filter my report, i dont knowhow to do.. thanks before

Software Development vb.net
Member Avatar for Luc001
0
127
Member Avatar for zilonox

I have a DataGridView that is attached to a BindingSource that gets data from a SQL Server database. I can populate the DataGridView without a problem. I can even insert/update it without issue if I run the update code from a click event of a button. But where I run …

Software Development vb.net visual-basic
Member Avatar for zilonox
0
1K
Member Avatar for vallarakesh

this program is to find the largest palindrome of 3 digit numbers.this code is workig for two digit numbers but it is not working for 3 digit numbers. `` #include<stdio.h> #include<conio.h> #include<math.h> void main() { int i,j,con=0; long int num=0,res=0; clrscr(); for(i=999;i>900;i--) { for(j=999;j>i;j--) { num=(i*j); con=pal(num); if(con==0&&num>=res) res=num; } …

Software Development c mathematics
Member Avatar for 2teez
0
200
Member Avatar for hszforu

when i use following code i do not get correct output: In this the function maxHeartRate returns an Integer value.Lets take it equal to 199. public String targetHeartRate() { double a = maxHeartRate()/2; double b = ((85/100)*(maxHeartRate())); String c = a+"-"+b; return c; } Using above code i get String …

Software Development java
Member Avatar for hszforu
0
201
Member Avatar for monmondiesel

Hi, I am running Ubuntu 12 on Virtual box and I am using GCC to compile this simple C program that has simple OpenMp pragmas : #include <stdio.h> #include <omp.h> #define MAX 10000000000 void main() { unsigned long long i,j,k,l; int threadnumber; #pragma omp parallel shared(i,j,k,l) { threadnumber = omp_get_thread_num(); …

Software Development c ubuntu visual-studio
Member Avatar for Sokurenko
0
1K
Member Avatar for apanimesh061

Suppose I want retrieve values froma table that are greater than 10, should I first store all the values in a list and then check condition of ">10" using any language or should I just just retrieve all values directly from databse using query : `Select id from table where …

Software Development java sql
Member Avatar for ~s.o.s~
0
113
Member Avatar for morganbrooke09

I can't get the accumulator right, It just keeps giving what the pay for the next day would be. Example: Enter 5 for workDays, get 0.32 for total Please let me know what it is I need to change. //This program calculates the total pay earned over x days. #include …

Software Development c++
Member Avatar for triumphost
0
159

The End.