132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for johndoe444

[CODE] int main() { hash_tree htree; htree.root.is_leaf = 1; htree.root.candidate_set.len = 0; item_set s; s.len = 1; s.items[0] = 0; add_item_set_to_hash_tree(&htree, s); s.items[0] = 1; add_item_set_to_hash_tree(&htree, s); s.items[0] = 2; add_item_set_to_hash_tree(&htree, s); s.items[0] = 3; add_item_set_to_hash_tree(&htree, s); s.items[0] = 4; add_item_set_to_hash_tree(&htree, s); s.items[0] = 5; add_item_set_to_hash_tree(&htree, s); printf("seg fault 1\n"); …

Software Development c
Member Avatar for kaoni317
0
115
Member Avatar for JAM1011

Hi, I was wondering if any knows how to specify the patch for the database when making a vb.net program executable. The data base which is access is in the debug folder of the program. Any Ideas Thanks James

Software Development vb.net
Member Avatar for kvprajapati
0
135
Member Avatar for PDB1982

I'm getting the following error and I don't know how to fix it: Error 1 error LNK2001: unresolved external symbol "public: static int HotDogStand::DogCounter" (?DogCounter@HotDogStand@@2HA) CartTesting.obj CartTesting I'm trying to use the HotDogStand::JustSold() function to increment the DogCounter variable by 1, or none (depending on user entry). I think my …

Software Development c++
Member Avatar for mitrmkar
0
87
Member Avatar for KirkPatrick

I have a program where my JFrame contains a tabbed pane with 3 tabs, I am wanting to make it so that when tab1/jpanel1 is doubled clicked it displays the contents of the JPanel on the second monitor. In my case the second monitor will be a large plasma screen …

Software Development display java
Member Avatar for KirkPatrick
0
3K
Member Avatar for PDB1982

I'm trying to see if there is a better way to go about getting the number of carts that the user inputs, instead of mandating that they have exactly three. My assignment calls for the following: "You operate several hot dog stands distributed throughout town. Define a class named HotDogStand …

Software Development c++
Member Avatar for WaltP
0
174
Member Avatar for isralruval

i have the following function which works, its encrypts a text file, well its suppose to shift the letters of a text file by whatever the user wants, lets say the text file says "zoo" if the user wants to shift the letters by 1 to the right the output …

Software Development c++ encryption ios
Member Avatar for NathanOliver
0
86
Member Avatar for elt6801

I have a task that sounds simple enough... but I don't code in Python; my background is in network design. So, here we go, I have to write a script that scans text files on a network share to parse for anything in the the text log that begins with …

Software Development gui python
Member Avatar for elt6801
0
169
Member Avatar for casjackkwok2001

Hi All, I'm stuck on my C++ assignment. I have no idea how to finish it...I think I'm missing something in my code such as how to double the size of the argument array and copy it, then initialize the unused elements of the second array with 0. thanks in …

Software Development c++
Member Avatar for Lerner
0
2K
Member Avatar for the_prox

Hi there, I'm working on a simple java program that allows a user to input numbers via console, throws an exception when a string is entered, and tallys up and prints the integers when the user simply hits enter with no input. i.e. Please enter a value: 5 Please enter …

Software Development java
Member Avatar for Estudiante
0
13K
Member Avatar for gerard4143

This is a Linux brainteaser for the C comfortable and leisurely bored. I'm not looking for the answer.. Note the compile lines are commented at the bottom of the program - Ubuntu and derivatives please use the second compile line or it will not work. So what does this program …

Software Development c slackware ubuntu
Member Avatar for gerard4143
0
136
Member Avatar for Alpdog14

I have this hashCode function that I have been trying to implement with Eclipse but my Tests keep failing. I am trying to write a Hashcode function that returns that last 2 or 3 chars of a word or number. Here is my current code: [CODE]public int hashCode(String value){ String …

Software Development java
Member Avatar for BestJewSinceJC
0
205
Member Avatar for funtoknow

I am taking an introductory course in C programming and using the Miracle C Compiler for assignments. I have been trying to find a way to "validate" user input a float variable. after declaring and initializing a variable called float fSale 0; // I try variations of printf ("\nEnter Sale …

Software Development c
Member Avatar for pebbles
0
393
Member Avatar for Merosansar

if(mail.equals(usermail) && date1.equals(date) && title1.equals(title)) { System.out.println("record is matched"); returnFlag = true; break; } the if statement is not executing even though all the strings are equals.

Software Development java
Member Avatar for ad_rulz
0
135
Member Avatar for IntegrySoft

Does anyone have a quick and easy piece of code that I could use to point to the url location of a bunch of image files and download them to a local folder? For example, imagine I wanted to download [url]http://www.mysourcewebsite.com/images/picture0001onsite.jpg[/url] through .../picture999onsite.jpg. I've not had a lot of experience …

Software Development c++
Member Avatar for nezachem
0
101
Member Avatar for vincenzorm117

In a function I placed the int array: factor[ g + 1] . g being input from the standard input but the program makes the array into this: factor[-1]. By the way I'm using xCode on mac. Why does this happen?

Software Development c
Member Avatar for vincenzorm117
0
109
Member Avatar for XinJiki

I am working on a homework assignment: File Input to the program is the body of the letter. Keyboard Input to the program is the name and address of the recipients. The file contains all the letter except the names, which are denoted by #N#. This occurs exactly once in …

Software Development c++ file-stream file-system
Member Avatar for Shinedevil
0
254
Member Avatar for rahul8590

Well ,it may sound a bit preposterous , but i have a pretty weird problem (which i have solved many times , dunno why it isnt working for me this time ) . I have a data file from which i randomly pick up row nos . The data file …

Software Development c++ ios
Member Avatar for WaltP
0
201
Member Avatar for Peppermaud

Here is the Homework question... This is another project involving static methods and arrays. Once again, static methods are covered in the text in Chapter 5. Methods with arrays as parameters are covered in Chapter 6 sections 4 and 5. (This applies to editions 6 and 7.) 1. Write a …

Software Development java
Member Avatar for stultuske
0
152
Member Avatar for LEEEEE

Hay i'm new here + new to c++ :cheesy: But not new to programming/Scripting (QBasic/VB/VBS/VBA/Batch/HTML) LOL Looks like i like the basic stuph :eek: Anyways i'm learning C++ But a good start would be a Compiler! So where do i get 1? oK thats my question! Thanx

Software Development c c# c++
Member Avatar for WaltP
0
214
Member Avatar for DiscoJesus

I'm pretty low-level at C++, but decided writing up a program to do some playtesting work for me would save a lot of time. Anyway, I'm almost done - been debugging for a little while, and I've managed to bring it down to 16 repeats of the same two errors...and …

Software Development c++
Member Avatar for Reisuke
0
1K
Member Avatar for sexyzebra19

I need this for matrix multiplication, I'm putting any 2 dimensional matrix into 1 dimension by column major order, i.e. the matrix 1 2 3 4 is stored as [1 3 2 4]. To try and figure it out I've worked out the pattern for 2x2 matrices: [code=php] data_[1] = …

Software Development c++ matrix-multiplication
Member Avatar for dusktreader
0
154
Member Avatar for amit.hak50

Given a sorted (increasing order) array, write an algorithm to create a binary tree with minimal height. In this I am not getting is that how we can store binary tree as an array.

Software Development algorithm java
Member Avatar for BestJewSinceJC
0
120
Member Avatar for lightninghockey

I was instructed in class to do the following.... The Programming Example: Calculator in Chapter 12 is designed to do operations on integers. Write a similar program that can be used to do operations on decimal numbers. (Note: If division by zero occurs with values of the int data type, …

Software Development java java-swing
Member Avatar for javaAddict
0
5K
Member Avatar for Encrypted

I have no idea why, but I'm having problems with getting my strings to compare properly. Below is my code. The part I'm having trouble with is in the while loop. For some reason the programs looping even when my string matches the constant. Any help would be appreciated. [CODE] …

Software Development c
Member Avatar for Encrypted
0
115
Member Avatar for brubru

Hi, Is there anyway on how can I calculate the paragraph size in centimeters? My idea is to build a document, by filling blank spaces left on a page that has a big paragraph.. If I knew the paragraph size, I could organize the document to save pages, joining small …

Software Development xml
Member Avatar for brubru
0
177
Member Avatar for tanvirahmad

Hi Experts i m using these code for selecting data grid row [CODE] While i <= DataGridView1.Rows.Count - 1 If Trim(DataGridView1.Rows(i).Cells(0).Value) = Trim(TextBox1.Text) Then DataGridView1.Rows(i).Selected = True Exit While End If i = i + 1 End While [/CODE] it's working nice. but , when no of row more then …

Software Development vb.net
Member Avatar for ukshir
0
4K
Member Avatar for denni2727

Well, my problem is that i have to print some text in a dot matrix printer with a 8.5in width x 6.5in height page. At first, I change the paper size of the printer in the server properties from windows and it fixed the problem but now i need to …

Software Development java printer
0
145
Member Avatar for techie929

/*I am getting the following errors free.cpp: In function 'int main()': free.cpp:24: error: expected `;' before 'obj' free.cpp:25: error: 'obj' was not declared in this scope free.cpp:25: error: expected primary-expression before 'int'*/ [CODE]#include<iostream> using namespace std; int array[]={0,1,2,3,4,5,6,7,8,9}; class free { public: void function(int array[]); }; void free::function(int array[]) { …

Software Development c++
Member Avatar for techie929
0
261
Member Avatar for isralruval

i have the following function which works, its encrypts a text file, well its suppose to shift the letters of a text file by whatever the user wants, lets say the text file says "zoo" if the user wants to shift the letters by 1 to the right the output …

Software Development c++ encryption ios
0
71
Member Avatar for Tango2010

Hi, I realise this may be a simple problem but i've really been pulling my hair out at the moment. I've got a text file, which I need to read each of the 15 characters (numbers and letters) on each line in to a new record in an array (called …

Software Development c
Member Avatar for WaltP
0
162
Member Avatar for ukshir

Hi, I have a project developed in VB.NET 1.1 (using VS 2003). The project has forms developed using the DataForm wizard (Connecting to Access Database, having a dataset and couple of adapter as automatically generated through the wizard - See attached screenprint "Original Form In VS 2003.PNG"). I converted the …

Member Avatar for ukshir
0
346
Member Avatar for renyges

hi guys i have develope a database based system recently but its shows a error as in title do anyone can help me???? its realy urgent guys here is my code : [code] Imports System.Data Public Class Form2 Dim inc As Integer Dim maxrows As Integer Dim con As New …

Software Development dataset open-source vb.net
Member Avatar for renyges
0
85
Member Avatar for dusktreader

In my application, i currently make many (parallel) calculations based on a time parameter. The calculation is a parametric function of time, so, each time value renders a unique solution. Currently, I have many threads that are calling the same calculation function, and the time parameters are often the same. …

Software Development c++
Member Avatar for dusktreader
0
291
Member Avatar for ontherocks

Below is my code. I am not sure why am I getting the error "[COLOR="Red"]javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "lcc" is not defined.......[/COLOR]" [CODE]import java.io.BufferedReader; import java.io.InputStreamReader; import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; import javax.script.ScriptException; public class Eval { public static void main (String[] args) throws Exception { ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine …

Software Development java
Member Avatar for ontherocks
0
115
Member Avatar for gedas

hey guys, i have a simple code that simply asks the user to input a number a number and than where you press you mouse it draws a circle you can draw as many circles as you have specified in the beginning of the app. well there is also a …

Software Development java java-swing
Member Avatar for skwatamkar
0
104
Member Avatar for orwell84

okay, so I wrote a program in Perl to find prime numbers and, when learning C, I decided to translate it into C. The thing is that...well...it doesn't work. No matter what I do, I get the same message when I say ./primes.c at the terminal: Segmentation fault. I know …

Software Development algorithm c perl
Member Avatar for orwell84
0
113
Member Avatar for macdougc

Hi I have encountered a problem using vectors. I have a vector<char*> in a for loop, adding a char* to it after each iteration, but when I exit the loop and run through the contents of the vector, it has 4 copies of the final char* added. Here is the …

Software Development c c# c++
Member Avatar for Salem
0
159
Member Avatar for morgan505

Hi, I've been asked to write a program using Python to count the number of words in a sentance. The exact task is outlined below: Write a Python Program to count: (i) the number of lines (ii) the number of word (iii) the number of character in a text file …

Software Development python
Member Avatar for vegaseat
0
116
Member Avatar for dbbd

I'm using a modulu on a variable that has a hex numeric value, apparently I;m doing something wong: [CODE] import sys import fileinput if len(sys.argv) != 2: print 'Usage: ', sys.argv[0], 'val' sys.exit(1) offset = sys.argv[1] print 'offset=',offset mod = offset%4096 if mod != 0: print "unaligned: ",offset [/CODE] since …

Software Development python
Member Avatar for dbbd
0
258
Member Avatar for corby

question: Two pointers that point to different arrays cannot be compared meaningfully. That's false right? because they can be compared in the same manner as integers are correc? if i am wrong please explain y or if u have anything to add please do!!!

Software Development c++
Member Avatar for Dave Sinkula
0
179
Member Avatar for angels21usa

I don't know anything about programming but I would like to figure out how to program this idea I had for calculating prime numbers. I know that this looks a little bit jumbled, but logically it should work. My basic idea is that the square root of the first number …

Software Development c++
Member Avatar for angels21usa
0
96
Member Avatar for irmak1771

Is there a way to know which data(row) dataadapter.update changed in the database? I have a datagridview, changes in the gridview are updated with dataadapter.update at the database. But I have two databases so according to changes made in the datagridview the second table should be recalculated. So I want …

Software Development
Member Avatar for Geekitygeek
0
176
Member Avatar for ticktock

Hello all! I am in the process of creating a restaurant application that lets the user select an item from a menu list (a listbox) and on a press of a button the selected item from the listbox transfers to to my current orders list (multicolumn listview, 3 columns; foodname, …

Software Development listview
Member Avatar for Geekitygeek
0
673
Member Avatar for snakay

Hi, I'm having problem when trying to read from ArrayList.Here is my code [code] ArrayList arrList; public ARMakbuz( ArrayList Alist) { arrList =new ArrayList( Alist); } private void ARMakbuz_ReportStart(object sender, EventArgs e) { foreach (ArrayList item in arrList) //Here I get exception { Fields["KOD"].Value = item[0]; Fields["DESC"].Value = item[7]; Fields["QTY"].Value …

Software Development
Member Avatar for snakay
0
153
Member Avatar for gnarlyskim

So I've missed the past week of my C++ class due to the SEC swimming championships being a week long :@, and I've missed the whole topic on file processing. I've been reading the slides and a few tutorials via lovely google searching, but it's a little hazy. Can anyone …

Software Development c++ file-system
Member Avatar for gnarlyskim
0
147
Member Avatar for skwatamkar

hello friend this is the code of my splash screen i want to play a background music when this screen is appears who can i do that i have "hbd.au" file.which i want to play at back ground.I also want to stop the music when it end i.e recursive playback …

Software Development java java-swing
Member Avatar for skwatamkar
0
140
Member Avatar for bzupnick

im trying to do the most basic c# program to show my college class and for some reason a couple of simple if statements are messing up my whole small program [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { …

Software Development c c# c++
Member Avatar for Geekitygeek
0
113
Member Avatar for sidd.

hi, how to round up a number. e.g. 3.4 to 3 and 3.5 to 4 thanx in advance

Software Development mathematics
Member Avatar for Geekitygeek
0
197
Member Avatar for tanvirahmad

Hi Experts My problem is how to search any text in data grid view ? please help me soooon........

Software Development vb.net
Member Avatar for TomW
0
107
Member Avatar for mrinal.s2008

Hi, In the code snippet below, I tried to write the contents of a vector to a file using ostream iterator. However, when I try to read the contents of the file using istream_iterator, there is a problem. When the istream_iterator object is initialized using ifstream object fin, the istream_iterator …

Software Development c++ ios
Member Avatar for mitrmkar
0
300

The End.