43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for srinivas88

Hi, I am writing a script which will run a process in a while loop, i.e., user will execute `sh test.sh ` and the script will run a set of processes, I want to know how to kill the script which is having a infinite while loop in its contents. …

Software Development shell-scripting
Member Avatar for L7Sqr
0
221
Member Avatar for anuragcoder

Hi! I've encountered another problem, The code below is just the part of the code where the error occurs int FindStr(FILE *f, char *str) { int s_pos; //string position in the text int c_pos; //char position in the text char *string; char ccnt; //char count s_pos = -1; c_pos = …

Software Development c++
Member Avatar for thunderox
0
11K
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 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 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 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 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 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 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 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 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 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 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 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 triumphost

I have the following code to take a bitmap of a portion of the screen specified by the Box Area. Area is just a struct that holds Width, Height, X1, Y1, X2, Y2 and represents a box. Basically a RECT with additional features. For some reason, if Box is (0, …

Software Development c++
0
88
Member Avatar for Krokcy

So i have a working network file transfer program now (if you want to see some of the code look at my other '[article](http://www.daniweb.com/software-development/java/threads/426357/networking-in-java-not-doing-it-right)'). But now that im trying larger files, im running into a problem where i run out of memory (which is understandable when the array is 1 …

Software Development file-system java
Member Avatar for Krokcy
0
4K
Member Avatar for #include <lou>

Hi everyone, I am trying to pass the X and Y values that are in class Chart onto class NodeAvg, but cant come up with the code to do that.Any help appreciated: package Testing; import java.awt.Color; import java.awt.Paint; import java.io.IOException; import java.util.ArrayList; import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; import org.jfree.chart.plot.DrawingSupplier; …

Software Development java
Member Avatar for NormR1
0
211
Member Avatar for iFrolox

Well i'll try to be clear as possible, i'm making like an account organizer (helper/tool) w.e you wanna call it, and for example i have 10 accounts. I want to delete account #5 (They are array), what i need it to do is move account #6, 7, 8, 9 & …

Software Development vb.net
Member Avatar for iFrolox
0
2K
Member Avatar for bettybarnes

Hello guys I'm new to C# programming. I'd like to know what's the equivalent of this Java static to C#? class NMM { public static void main(String []args) { System.out.println("java"); } static { System.out.println("great"); NMM.main(null); System.out.println("programmer"); System.exit(0); } } Any help would be appreciated.

Software Development c#
Member Avatar for bettybarnes
0
475
Member Avatar for mohan_m01

Generate XML from DataTable, along with count Hi, I have an sql result set assigned to a datatable. The result set is of the form ManagerId | VendorId | Count ------------------------------ M1 V1 10 M1 V2 5 M2 V1 10 M2 V2 5 M3 V1 10 M3 V2 5 I …

Software Development xml
Member Avatar for Mike Askew
0
145
Member Avatar for Mikey12345

Hi Im trying to achieve something which seems simple but is proving difficult. I have listview1 which will display the values of two textbox's when a button is clicked. I have listview2 which will make a calculation based on the two values in listview1 when a button is clicked. What …

Software Development listview vb.net
Member Avatar for Reverend Jim
0
166
Member Avatar for Suzie999

I'm currently concantenating an array like so... int _tmain(int argc, _TCHAR* argv[]) { //create buffer to receive path WCHAR pathbuf[MAX_PATH]; //get path into buffer DWORD pathlen = GetCurrentDirectoryW(MAX_PATH,pathbuf); //append file name to buffer pathbuf[pathlen++] = '\'; pathbuf[pathlen++] = 'f'; pathbuf[pathlen++] = 'i'; pathbuf[pathlen++] = 'l'; pathbuf[pathlen++] = 'e'; pathbuf[pathlen++] = …

Software Development c++
Member Avatar for Suzie999
0
213
Member Avatar for Lius

This same code run good on windows 7 32 bit Problem happen when i run it on windows 7 64 bit error : database is locked... public void genTablehadir() { tblKehadiran.setAutoCreateColumnsFromModel(false); m_data = new Kehadirantable(this); tblKehadiran.setModel(m_data); tblKehadiran.setRowHeight(23); //inisialisasi int m_Jalokasi=0,m_kode=0; Boolean m_alokasi=false; String[] parsePeriode; String m_npk="null",m_nama="null",m_ket="null",m_id="null",m_flagE="null",m_flagP="null",m_cekhk="null",m_ceksts="null"; try { db.createMasterConn(); rs1 …

Software Development java sqlite
Member Avatar for Lius
0
346
Member Avatar for hszforu

I know how the ++ operator and -- operator works.This is my code to count the no of digit in an integer and it works perfectly. import java.util.Scanner; public class modified_sepadigit { public static void main(String args[]) { Scanner input=new Scanner(System.in); System.out.println("Enter a number"); int no=input.nextInt(); int noOfDigit=0; int tempNo=no; …

Software Development java
Member Avatar for hszforu
0
123
Member Avatar for mahela007

Is it possible to keep writing the output of a program on the same line instead of moving to a new line every time? The output should be written over the preceding output. An example would be a kind of counter... say a number that counts from 1 to 10 …

Software Development python
Member Avatar for Lucaci Andrew
0
11K
Member Avatar for Baduizm

I have a written code on a simple address book which allows addnew,view single entry and view all names. I have added the delete functionality to allow one to enter name to delete its entry but I get Error: [B]cannot find symbol return addressBookEntry.delete(); symbol:method delete() location:variable addressBookEntry of type …

Software Development gui java
Member Avatar for Mutucks
0
474
Member Avatar for triumphost

I've just read a tutorial on Classes Under the hood/behind the scenes. It says that: Foo* A = new Foo(); // Is different from: Foo* B = new Foo; What in the world? I never put the brackets for my classes like that. Why does the first initialize variables and …

Software Development c++
Member Avatar for mike_2000_17
0
271
Member Avatar for KY_Fan

This class just keeps getting worse. My next lab he had us do is this, **"Write a program that computes the intersection of a circle with a horizontal line and displays the information textually and graphically".** He gave us absolutely no help or anything to do this. He just said …

Software Development python
Member Avatar for KY_Fan
0
425
Member Avatar for poloblue

Good Afternoon, I'm having difficulties with a program that deal getting the letters frequencies from an input text file. So far I have this code. Cpp file: #include <iostream> #include <fstream> #include <string> #include <cstring> #include <cmath> #include <cstdlib> #include <iomanip> #include "lab_19_head.h" using namespace std; int main( ) { …

Software Development c++
Member Avatar for Ancient Dragon
0
98
Member Avatar for hughesadam_87

Hi, If I have a list of strings, it's easy to output them using .join(). For example: mylist=['hi', 'there', 'girls'] myout='\t'.join(mylist) What I want to know is if there is a builtin python method that acts like join, except it automatically converts ints and floats to strings without giving a …

Software Development python
Member Avatar for TrustyTony
0
124
Member Avatar for Lucaci Andrew

Hi. So I get this weird error message out from a QT application that i'm creating: 0xc0000005: read access violation at: 0x0, flags=0x0 Basically what I'm trying to do is to set in a QT List Widget an item of type QList Widget Item in which I store two things: …

Software Development c++ microsoft-access qt
Member Avatar for Lucaci Andrew
0
3K
Member Avatar for JESIA72

hey all iv have an assignment(wrtie an employee payroll program) which iv seen alot of other people have posted about so sorry for bringing it up again but im stuck. Iv made the program and it runs fine but it always calculates grosspay and netpay as 0.0 everything else (firstname …

Software Development business-entrepreneurship java
Member Avatar for jLocke
0
566
Member Avatar for 4evrmrepylrning

I have this: import re subs = [] def subcons(data): match = re.search(r'(<[a-z]{3})', data) if match: subs.append(match.group(0)) data = data.replace(match.group(0), '') subcons(data) else: print data return data, subs input = 'ABC <uvw <xyz some random data' e, f = subcons(input) print e print f The print statement in the else …

Software Development python
Member Avatar for TrustyTony
0
212
Member Avatar for wallet123

> Hey guys! good evening! > hope you can help me with this one. > this is the thing that i want to do!: > > -Input 2 values : 1 string, and 1 int > -the string should have only letters (cant contain numbers!) > -encrypt the string using …

Software Development encryption java
Member Avatar for wallet123
0
192
Member Avatar for me_coolvibes

Hi, I have just started learning VB.NET and recently tried to write my first piece of code. I am getting an error message that says: ******Statement cannot appear within a method body.End of method assumed. ****** Here's my piece of code: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As …

Software Development vb.net
Member Avatar for me_coolvibes
0
191
Member Avatar for jalpesh_007

I got error of ArrayIndexOutOfBounds Exception in following code. Please help me to how to solve the error.I also used String tokenizer class. import java.io.*; import java.lang.*; import java.util.Arrays; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.Reader; import java.util.StringTokenizer; public class CSV{ public static void main(String[] …

Software Development dataset java
Member Avatar for JamesCherrill
0
405
Member Avatar for trishtren

Hey, i googled around for a solution but seem unable to come up with a reasonable solution to the problem of passing a class as a parameter. I wish to mimic the syntax used in java like below : setPenColor(new Color(255, 0, 255)); Where i can pass a new object …

Software Development java
Member Avatar for JamesCherrill
0
209
Member Avatar for tariqondego

hi, i would like to assign the value of a combobox to a variable and use this variable as a parameter on the insert statement.see code below,code 1 works ok,but code 2 brings an error relating to wrong datatype,i cant seem to find where the problem because i think i …

Software Development vb.net
Member Avatar for tariqondego
0
179
Member Avatar for chophouse

This is part of another script, too long for here, but isolating this part, my dilemma is that this works when manually invoked from IDLE, but not when run as a cron job. from datetime import datetime import os # check to see if a log file exists, make one …

Software Development python
Member Avatar for chophouse
0
239
Member Avatar for alemojarro

Whenever I load the object there are these random symbols around the data. public void Save() { try { System.out.println("Where would you like to Save?"); File thefile = new File(Input.next()); FileOutputStream fout = new FileOutputStream(thefile); ObjectOutputStream oos = new ObjectOutputStream(fout); oos.writeObject(list.getRoot()); oos.flush(); oos.close(); fout.flush(); fout.close(); } catch (Exception e1) { …

Software Development java
Member Avatar for alemojarro
0
98
Member Avatar for poloblue

Good Afternoon, I'm having trouble with an assignments that deals with arrays. I'm stuck in the part that says Decide whether the value entered by the user at (2) is in the array numbers[SIZE] or not. So far I have this code #include <iostream> #include <fstream> #include <string> #include <cstring> …

Software Development c++
Member Avatar for poloblue
0
140
Member Avatar for VernonDozier

I've been studying up on virtual destructors and how they work and I wrote this little program. I've been adding and removing the word "virtual" on lines 9, 16, and 23 to see what happens. #include <iostream> using namespace std; class a { public: a(){cout << "a::a()" << endl;} virtual …

Software Development c++
Member Avatar for VernonDozier
0
220
Member Avatar for zilonox

Okay, I know some of you are looking at that title and thinking I'm quite daft because obviously I have to have a dataadapter if I have a bindingsource. And you're right, there is a dataadapter, but it's not exposed to me. I've taken over a winforms project (attached to …

Software Development sql vb.net visual-basic
Member Avatar for zilonox
0
2K

The End.