132,726 Archived Topics
Remove Filter ![]() | |
[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 | |
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 | |
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++ | |
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 … | |
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++ | |
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 | |
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 … | |
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++ | |
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 | |
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 … | |
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 | |
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 | |
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 | |
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++ | |
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 | |
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 | |
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 … | |
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 | |
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 | |
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++ | |
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 | |
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. | |
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 | |
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 | |
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 | |
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 | |
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 … | |
/*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++ | |
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 | |
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 | |
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 … Software Development database-design dataset microsoft-access vb.net | |
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 | |
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++ | |
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 | |
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 | |
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 … | |
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 … | |
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 | |
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 | |
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++ | |
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 | |
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 | |
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 | |
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 | |
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 | |
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) { … | |
hi, how to round up a number. e.g. 3.4 to 3 and 3.5 to 4 thanx in advance Software Development mathematics | |
Hi Experts My problem is how to search any text in data grid view ? please help me soooon........ Software Development vb.net | |
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 … |
The End.