43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for lexusdominus

Im having some problems organising my code in a large (for me) project. Basically my problem stems from having 1400 lines in one source file. Ive written 38 functions which all have declarations above the main function. Below my main function block i have all of the function definitions. Im …

Software Development c++
Member Avatar for lexusdominus
0
158
Member Avatar for begnnr_help

I have a problem where I am writing a program that has a predefined costs for tickets. The program asks what city you want to go to and then it asks how many tickets you want to buy and it calculates the cost. If you want more it will ask …

Software Development c++ ios
Member Avatar for begnnr_help
0
202
Member Avatar for sparcheta3

Hi guys, I'm new and self teaching myself C++. A problem from the book says to create the CandyBar Struct and the create a dynamic array that hold 3 structures, initialize the structures and output each of them. The code works BUT I'm wondering if there is an easier way …

Software Development c++
Member Avatar for jencas
0
140
Member Avatar for plusplus

I have the following code for reading an online file, somehow the first line returns an empty string, what can be the reason for this? Dim myRequest As WebRequest = webRequest.Create(myurl) myRequest.Proxy = WebRequest.DefaultWebProxy Dim mystream As Stream = myRequest.GetResponse.GetResponseStream() Dim objReader As New StreamReader(mystream) Dim sLine As String = …

Software Development file-stream vb.net
Member Avatar for Teme64
0
594
Member Avatar for weblover

hi all ...how are u? i have a question ...how can i output the items of a java Stack ...is there any predifine method?? and another question ...how can i use the class Queue without interface ? ...because i'm typing in my code (Queue q =new Queue();) but it's giving …

Software Development java queue
Member Avatar for weblover
0
206
Member Avatar for major_lost

Can someone give me some idea how to write the rtf file required for the VB4 help complier. Please explain in english in simple terms. I don't understand the instructions at all and I am: major_lost

Software Development visual-basic
0
62
Member Avatar for titosd

Hello, I have a question about sorting. How can I sort HashMap by element in the HashMap ? That's meaning, if I have in the Sys class map such as: [code=java]protected Map <Constructors,RaceTeam>raceTeam=new HashMap<Constructors,RaceTeam>();[/code] and in the RaceTeam class I have this variables: [code=java] protected Constructors name; protected int totalScore; …

Software Development java
Member Avatar for titosd
0
88
Member Avatar for kakakon

Hello, I have a Tree structure with custom TreeNode nodes. The structure of TreeNode is: private int level; private String label = null; private String data = null; private TreeNode parent = null; private Vector <TreeNode> children = null; I should find each unique path from root to all leaves …

Software Development data-structure java
Member Avatar for kakakon
0
163
Member Avatar for chaines51

I have a class (String) that I want to be able to implicitly convert to a char. How would I go about doing this? I know to do it the other way around, I just add a constructor that just takes a char as a parameter, but to convert from …

Software Development c++
Member Avatar for chaines51
0
173
Member Avatar for PinoyDev

Hi good day.! Im so confused why my code to get the total records in a certain table in sql server returns false. Im already connected to sql server and set-up a table named "loanlist".This table contains 10 records. But when i want to get the recordcount, it will returned …

Software Development sql visual-basic
Member Avatar for PinoyDev
0
212
Member Avatar for -Xlayer-

The basic set-up is: [CODE=python] class A(): def __init__(self): self.var = 1 @staticmethod def do_stuff_with_var(self): # A method which uses self.var ... class B(A): def __init__(self): A.__init__(self) b1 = B() b2 = B() list_of_B_instances = [b1, b2] for instance in list_of_B_instances: instance.do_stuff_with_var(instance) [/CODE] However the last line of code raises …

Software Development python
Member Avatar for -Xlayer-
0
292
Member Avatar for daniel88

Hi guys, I will keep this post short in order that I first confirm that I am in the right place. Basically, I want to begin a personal project to build a GUI program to play the card game 500. I have completed one year of university programming with a …

Software Development gui
Member Avatar for daniel88
0
120
Member Avatar for clueless123

hi people, i am currently doing database C# using visual C sharp express and i am really new towards database programming. I actually taken my database from mc access using oledbconnection. One of the column in my database contain many words seperated by a comma in each particular row. I …

Software Development
Member Avatar for clueless123
0
129
Member Avatar for juser11

Am having problem calling a simple stored proc to insert data from a java program. The insert statement works fine when called directly with prepare statement. But when I use call it through a strored proc I get an error. jar file is ojdbc5.jar. - oracle10g. Then i tried another …

Software Development apache java oracle
Member Avatar for kvprajapati
0
798
Member Avatar for george_cpp

Hi All, Does anyone know which file manipulation library is faster between c's FILE and c++'s fstream? I would suppose that c++'s fstream would be the faster but I just wanted to see some expert advice/opinion on this. I googled the internet without finding anything concrete. If there is any …

Software Development c++
Member Avatar for monkey_king
0
5K
Member Avatar for goody11

For some reason my shutdown function that i'm making won't work. I get this error: In function `void shutdown()': expected `,' or `...' before numeric constant Here is my coding: #include <windows.h> void shutdown(); void shutdown() { BOOL WINAPI ExitWindowsEx(UINT EWX_REBOOT, DWORD SHTDN_REASON_MAJOR_HARDWARE); return; } int main() { shutdown(); } …

Software Development c++
Member Avatar for goody11
0
187
Member Avatar for drjay1627

hello, I wanna create a struct in python. the struct needs to have a char and an array of chars. eg. (ruby code): [code] Somestruct = Struct .new(:character, :characterArray) structure = Somestruct.new(" ", []) [/code] How do I do this. I made a Trie in ruby and now I wanna …

Software Development algorithm python ruby
Member Avatar for scru
0
140
Member Avatar for ccandillo

I cannot seem to figure this out. This part of a larger script that I am writing. I have a list that looks like this. The fields are servername, port and program. How do I sort it to get a tally of what servers are listening on what ports. This …

Software Development python
Member Avatar for woooee
0
144
Member Avatar for exzibit23

is it possible to use try catch exception inside while loop? [code=java]while(username_ctr <= 5){ try{ user1 = str_div[username_ctr].indexOf("open_pm_tab",username_start); user2 = str_div[username_ctr].indexOf("')", user1); user3 = str_div[username_ctr].lastIndexOf(',', user2) + 3; str_username[username_ctr] = str_div[username_ctr].substring(user3, user2); //System.out.println(str_div[username_ctr].substring(user3, user2)); username_ctr++; }catch(Exception e){ slash1 = str_div[username_ctr].indexOf("</font", 0); slash2 = str_div[username_ctr].lastIndexOf('*', slash1); //System.out.println(slash1); //System.out.println(slash2); //System.out.println(str_div[username_ctr].substring(slash1, slash2)); //System.out.println(str_div[1].substring(slash2,slash1)); …

Software Development java
Member Avatar for ~s.o.s~
0
4K
Member Avatar for Ole Raptor

I am having a small problem locating any information on this little problem on the net so I am coming here for help AGAIN. I have a VB6 project that has a combobox. This is needing to display data from my SQL db. I have it displaying the data fine. …

Software Development visual-basic
Member Avatar for Ole Raptor
0
265
Member Avatar for Web_Sailor

Hi, I am trying to do something like this:- [CODE]1 10 20 30 ##########|##########|########## rect 1 rect2 rect3 5 ########### 15 user rect - (transparent and temporary based on user mousedrag) [/CODE] Now If a user clicks suppose in the middle of rect1 and drags it to the middle of …

Software Development java java-swing
Member Avatar for Web_Sailor
0
167
Member Avatar for Raouldukey

I am using vb.net 2005 (express) and can't quite figure out how to do this. I have an application that reads in a bunch of data from a file into the appropriate variable arrays like I want. I used a simple solution that I found here on DaniWeb to read …

Software Development file-system vb.net
Member Avatar for Raouldukey
0
266
Member Avatar for franceee

Hello I am getting this error message WebException: The request failed with HTTP status 401: Unauthorized.] System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +431289 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204 Dashboard.Crm_Deployment.CrmDeploymentService.Execute(DeploymentServiceRequest Request) in C:\Downloads\Dashboard\Dashboard\Dashboard\Web References\Crm_Deployment\Reference.cs:79 Dashboard._Default.Page_Load(Object sender, EventArgs e) in C:\Downloads\Dashboard\Dashboard\Dashboard\Default.aspx.cs:136 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 …

Software Development
Member Avatar for franceee
0
603
Member Avatar for KirkPatrick

I'm having a problem with my countdown timer and am figuring that I'm missing something obvious. All I'm trying to do here is get my jLabel to countdown from 60 to 0. [code] ActionListener refreshListener = new ActionListener() { int counterLimit = 60; public void actionPerformed(ActionEvent e) { javax.swing.Timer refreshTimer …

Software Development java java-swing
Member Avatar for KirkPatrick
0
118
Member Avatar for kimbokasteniv

So I am writing a voice activated recording program, and one of the things I would like it to do is plot the current and past volume level on a JPanel. Write now I am simply reading one byte from the audio buffer, converting it to an int, taking its …

Software Development audio java
Member Avatar for kimbokasteniv
0
215
Member Avatar for petya.ivanova

Hi guys, Im pretty new to C# and I have a problem hoping that most of you could solve cause you are quite an experienced developers :) Here's my problem: I have a simple Windows Application Form with a dataGridView and a button. I want when the button is clicked …

Software Development caching
Member Avatar for petya.ivanova
0
158
Member Avatar for Stefano Mtangoo

Hi, I'm working on little phone book program with wxPython and SQLite. I can get database populated and can retrieve back the phones and names, but when I do fill them in ListCtrl it throws cruel errors :) Here is the retrieved data from database: [(1, u'Steve', u'Giddy', u'0654743553'), (2, …

Software Development python sqlite
Member Avatar for Stefano Mtangoo
0
991
Member Avatar for Sky Diploma

I am confused by the use of an un-named namespace and its practical applications. The C++ Programming Language states that. [code] namespace { //Content } [/code] [b][COLOR="Green"]is equal to [/COLOR][/b] [code] namespace $$$ { //Content } using namespace $$$; [/code] Where $$$ is a unknown and random name. However I …

Software Development c++
Member Avatar for siddhant3s
0
110
Member Avatar for rmlopes

Hi all, I am new to threads in c++, and I must use the pthread library. The documentation is easy to understand, but there is a more general aspect that I am missing. My question is: Is it possible to give a pointer to an object's function as argument to …

Software Development c++
Member Avatar for rmlopes
0
118
Member Avatar for sravan953

I have some code here: [CODE]import urllib import subprocess import time open_site=urllib.urlopen("http://www.freewebs.com/sravan953/command_python.html") read_site=open_site.read() site_list=[] for a in read_site: if a=='<': break elif a!='<': site_list.append(a) site_list.remove('\n') site_list.remove('\n') site_list.remove('\r') for a in site_list: site_string=''.join(site_list) def run_program(): current=time.asctime() print 'Runnning program'+' ['+current+']' subprocess.call(site_string) def check_argument(): current=time.asctime() if str=='': print 'No command given'+' ['+current+']' …

Software Development python
Member Avatar for Stefano Mtangoo
0
134
Member Avatar for jrex

I am having trouble with a list that doesn't want to append like they normally do. I have been messing around with it for the last couple of days off and on. For the life of me I can't seem to figure out what I am doing wrong. n=range(0,31) x=[] …

Software Development python
Member Avatar for woooee
0
1K
Member Avatar for ViLeNT

Hello, I am fairly new to scripting, I am interesting in writing a shell script which acts as a DOS command. I want to be able to utilize dos commands such as cd, dir, type, del, ren, and copy to do the same functions as the UNIX commands, cd, ls, …

Software Development shell-scripting unix
Member Avatar for sknake
0
141
Member Avatar for VIPER5646

[QUOTE]HI These are the forms I Have Log in,Customer,Order. They are opened In this order. At start up the Log in Form assigns the User in The Order Form and all works fine. But when I close the Order Form I loose the user. I would like to maintain the …

Software Development visual-basic
Member Avatar for VIPER5646
0
81
Member Avatar for dephrate

Hello, I'm writing a program for class that holds information from a parking garage and calculates the cost of parking for each vehicle and the total revenue generated. The code I've written uses a struct Car which contains variables for `Tag#(string)`, `Make(string)`, `Cost(int)`, `Time in(int b/w 1 & 24)`, and …

Software Development c++
Member Avatar for dephrate
0
162
Member Avatar for seank

I have python 2.4.4 installed on Ubuntu for use with Zope 2.9.8 (plone). I am moving my zope/python install from a hosted server to a new server of my own. I am setting up everything from scratch for the first time. When testing my installation, I get an error message …

Software Development python ubuntu
Member Avatar for seank
0
259
Member Avatar for abhishaki

hello friends,I made an applet to calculate sales tax but i am having a problem in executing it.It is giving error on execution. and the error it is giving is, cant create:java.lang.reflect.InvocationTargetException following is the piece of code of applet. import java.awt.*; import java.awt.event.*; import java.text.*; import javax.swing.*; public class …

Software Development java java-swing
Member Avatar for abhishaki
0
170
Member Avatar for cougarclaws

Hi all, Class assignment is to list all numbers between user input. I have this much, but have no idea how to get it to list the numbers between them. I know this is simple, but it still eludes me ;) Thanks in advance! [code=cplusplus] #include <iostream> using namespace std; …

Software Development c++
Member Avatar for Narue
0
94
Member Avatar for andy126

Hi, I'm trying to read data from a text file and store it into an array. I know this issue has been dealt with earlier, but none of those threads seem to be helpful in this case. Sorry in advance if I missed a relevant post. The data in the …

Software Development c file-system
Member Avatar for jephthah
0
163
Member Avatar for SnagglezMaw

I'm trying to compare lines in two different files. The basic idea is I want to take line 1 of file 1 and compare it to all the lines of file 2 and print the results into a third file, then do the next line of file 1 and repeat …

Software Development java
Member Avatar for Ezzaral
0
113
Member Avatar for Achayan

Hi All I think this is my post in DW . I need a help from you guys . I have a data [code] ['\x1a', '\x05'] [/code] , and how i can convert this to ascii ?? Any ideas , please give a hint :) thanks

Software Development python
Member Avatar for vegaseat
0
128
Member Avatar for somekid413

I am using python portable on a thumb drive and on some computers my script works normally, on others it does not. I Checked the paths and it had the _imaging.pyc file and the path was set up for it correctly on all computers. Is this because 1 computer has …

Software Development python
Member Avatar for vegaseat
0
682
Member Avatar for giftalp

I have problem to start. I need algorithm for program that prompts the user to input a sequence of characters and outputs the number of vowel, using user-defined value returning function Vowel. Please help

Software Development algorithm c++
Member Avatar for Dave Sinkula
0
2K
Member Avatar for llemes4011

Hi, I'm new to C++, I learned to program in Java first. I'm having trouble getting this to work. I'm writing a text based version of battleship. It was going well until i tried to set the size of the ship. I'm using an int array to check to see …

Software Development c++
Member Avatar for Narue
0
101
Member Avatar for cwarn23

Hi, I have been learning some c++ with a friend and saw a [URL="http://www.youtube.com/watch?v=nY8z5Eh-kcg&NR=1"]youtube video[/URL] where there were some features I just couldn't find in my version (express edition). I have to ask in which version of Visual Studio 2008 does the Project type [I]Windows Forms Application[/I] appear in where …

Software Development c++ gui visual-studio
Member Avatar for cwarn23
0
132
Member Avatar for niketan

I am trying to convert my c structures to c# structures. I am facing one problem as character is one byte representation in c and two bytes in c#. How to construct xyz structure with character having one byte??

Software Development c#
Member Avatar for ddanbe
0
3K
Member Avatar for Redserpent

Hi Guys. First let me say that this site is fantastic and the knowledge spread is vast. OK, now I'm somewhat of a noob when it comes to VB.net 2008 and have not long been coding with it. I came across a problem with the cancel button on an "input …

Software Development vb.net
Member Avatar for kvprajapati
0
329
Member Avatar for NetGD

Hello, I am am trying to get a ListView to populate based on an xml file. to acheive this I would like to use the DataTable. this is my XML file: [CODE]<?xml version="1.0"?> <main> <person> <id>1</id> <name><first>Joe</first><last>Blow</last></name> </person> </main>[/CODE] And the C# that I am using to read it: [CODE]public …

Software Development c c# c++ dataset listview xml
Member Avatar for kvprajapati
0
1K
Member Avatar for cs_tx_usa

Hi all, I am trying to make a program in VB .NET that has two "browse" bottons, two textboxes which should show the full path of the files to be selected, one "Save As" button, one textbox that should show the file's full path where to be saved in, an …

Software Development file-system vb.net
Member Avatar for tathumani
0
264
Member Avatar for Piya27

Hi All, I am new to Vb.NET. and I am Trying to develop a textpad application using richtextbox control.. Now my problem is that, while using this application. when user clicks on Close event in File Menu, I want the Editor to only close that particular file(or text) that is …

Software Development vb.net
0
52
Member Avatar for asifjavaid

Hi all, I working in VC++. I have a void pointer. I am assigning a memory block to it using malloc(). void* buf_ptr = NULL; buf_ptr = malloc(1428480); I am filling this buffer using fread(). and I want to index this buffer (buf_ptr) to acces its data. How can I …

Software Development c c++ open-source
Member Avatar for asifjavaid
0
2K

The End.