132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for pvi101

Hi all, I am a Python Newbie and started learning it with this book "Programming in Python 3", which has a lot of sample codes. So I am using Python 3 and got stuck while trying this program.The program is to swap the elements in the Tuple and how to …

Software Development python
Member Avatar for supernovicevn
0
199
Member Avatar for ramborambo

Hey guys! i need help on reversing numbers in descending order. public class ArrayExercise1 { public static void main(String[] args) { int[] values = new int[10]; values[ 0 ] = 1; values[ 1 ] = 4; values[ 2 ] = 9; values[ 3 ] = 16; values[ 4 ] = …

Software Development java
Member Avatar for ramborambo
0
263
Member Avatar for pyramid

I have been working on this lab for a couple of days. I need to write a program (using a 'for loop') that approximates pi using the following series: pi = sqrt(6* (1/(1)2 + 1/(2)2 + 1/(3)2+ 1/(4)2 + 1/(5)2 +...... + 1/(n)2)) where n is the number of terms. …

Software Development c++
Member Avatar for Nick Evan
0
294
Member Avatar for nanchuangyeyu

Hi, I am writing some code to model the neighborhood of an element in an 2D mathematic matrix(using 2D vector) ,e.g. to an element indexed by vec_2d[x][y], I want to present its neighborhood in form of a vector which is composed of vec_2d[x][y-1],vec_2d[x-1][y-1],vec_2d[x-1][y] and vec_2d[x-1][y+1]. And following my code is …

Software Development c++ ios
Member Avatar for Nick Evan
0
829
Member Avatar for sommer_queen

Hello everyone, i am having problems in passing arguments to the event handler which i am trying from the past 2 days and not able to solve it. my code looks like this below. I try to Create a button for the tabpages dynamically.Lets say we have 4 tabpages and …

Software Development
Member Avatar for sommer_queen
0
97
Member Avatar for giri.pankaj

Have written an unscrambler in java. This takes in a scrambled word for input and returns the unscrambled word. The way it works is that it creates all permutations of the provided word (I have borrowed the permutation generating code from daniweb i guess) and compares each word to an …

Software Development java
Member Avatar for iamthwee
0
1K
Member Avatar for leowasif

i had to make the car racing game in c++ by using classes but can't understand it, the requirement of the game r it contain speed o meter, fuel and gear system and move in all four direction plz help me.... no graphic r required just simple car game on …

Software Development c++
Member Avatar for Nick Evan
0
317
Member Avatar for m610

I guess I should be embarrassed to ask this, but Help seems to be misleading to me, so it's not my fault. ;) I'd like to enter a series of binary numbers in a component I am working on. Delphi's Help (see below) says all I need to do is …

Software Development delphi pascal
Member Avatar for weinelb
0
1K
Member Avatar for winrawr

I've been able to design a front-end for a C DLL, calling the DLL functions from the VB program but I'm having trouble calling the VB functions from the C DLL. Maybe I should have put this in the C forum, but I don't know. If I have this in …

Software Development visual-basic
Member Avatar for winrawr
0
243
Member Avatar for Considerate
Member Avatar for anandarju
0
72
Member Avatar for HunterFish

How to sort an xml file or a text file using gtkmm? This is the sample of the file that I want to sort. <LIST> <name> Example </name> <country> <name> Country </name> <pop> <desc> Japan </desc> <uri> 100 </uri> </pop> <pop> <desc> China </desc> <uri> 108 </uri> </pop> <pop> <desc> …

Software Development c++ file-system xml
Member Avatar for HunterFish
0
205
Member Avatar for Deme

Alright, so i'm trying to make a type of database using file i/o where you type in a username and password and it writes it to database.txt... The issue is, i'm trying to find a correct and clean way of reading, or 'searching' for the username and password and compares …

Software Development c++ file-system ios
Member Avatar for valtikz
0
988
Member Avatar for aveao

I am having trouble getting the counts store the value from one button click to another. The formula works as far as calculating the salary and the commission and on each button click it adds one to the proper section of array but when i press the button again the …

Software Development vb.net
Member Avatar for Teme64
0
95
Member Avatar for gsarin

Hi, I am trying to run a Perl-CGI script through Tomcat Server and running into issues. The script runs fine through command prompt and also runs half through webpage. The problem comes when I try to access some files in directories located on some other server. I think tomcat security …

Software Development perl
Member Avatar for gsarin
0
451
Member Avatar for TaubBaer

I had been creating 5 files and I kept hitting the wall. Hope that you will be able to help me pinpoint the problems. (I am not an programmer by the way.) I had been researching for more details on those problems, no luck. Enclosed are 5 files that I …

Software Development java
Member Avatar for TaubBaer
0
558
Member Avatar for Bhoot

In my client-server architecture, the cilent-side application would send specific messages to the server-side application. How should i handle those messages? Previously, in a small project, i had just passed the received message to a method where it would process the message through a switch case structure. However, this doesnt …

Software Development client-server
Member Avatar for Bhoot
0
138
Member Avatar for raghuprasad

hi, I am able to display a single image from the database on a webpage using the following code: rs1 = st1.executeQuery("select image from pictures where id='5'"); if(rs1.next()){ int len = imgLen.length(); byte [] rb = new byte[len]; InputStream readImg = rs1.getBinaryStream(1); int index=readImg.read(rb, 0, len); System.out.println("index"+index); st1.close(); response.reset(); response.setContentType("image/jpg"); …

Software Development display java
Member Avatar for kvprajapati
0
785
Member Avatar for shahbaz5144842

Hi to all ! Im new to java n i m working on Project of Web base Image Annotation Tool using jsp and java i have to save n retrieve image in to database which im using is mysql How i can store image in to database not the refference …

Software Development image java java-jsp mysql
Member Avatar for deepalihanand
0
108
Member Avatar for Lukezzz

I have a problem when it comes to cancel a backgroundworker from working. I start the backgroundworker successfully and the worker supports cancellation is set to true. What I do is to use a button that both can run the backgroundworker and next time you press the same button, it …

Software Development c++
Member Avatar for Lukezzz
0
115
Member Avatar for abhay_pundir

Hellllo everyone. i want to know that how to open a excel file in c# and how to copy the excel file data to the clipboard. thanx

Software Development
Member Avatar for serkan sendur
0
162
Member Avatar for Whelk

I'm trying to set up a login procedure. Here's what I'm trying: [code="python3"] import users import sys print() print("Please enter your username.") print() username = input(">") if username not in users.usrlist: print() print('User does not exist.') sys.exit() else: user = users.username print() print('Please enter your password. Note that for security …

Software Development python
Member Avatar for woooee
0
149
Member Avatar for Xellos_Moon

Help me solve this problem, dont worry, im just starting out so its all very basic...and easy to you guys, i would imagine. [QUOTE]Two strings X and Y are said to be conjugates if, by shifting the symbols of Y in a cyclic fashion zero or more times, you can …

Software Development c++
Member Avatar for ArkM
0
91
Member Avatar for as_ad

hiii plz i need a help in the following Qs using assemply lang i am a Beginner and i dont know how to solve it....plz help. Q1. Write an 8051 assembly program to convert a series of ASCII numbers to packed BCD. Assume that the ASCII data is located in …

Software Development assembly
Member Avatar for as_ad
0
126
Member Avatar for Akis2000

hi.. ok here is my problem i want to make a fuction that ask from the user which series he/she wants to use and the precision (number of digits, up to 10). If after 10000 iterations the series doesn't find the value of p, it should display an error message. …

Software Development c++
Member Avatar for Akis2000
0
351
Member Avatar for Dewey1040

i dont understand why this isnt working ill post the code thats relevent for some reason no matter what numbers i enter it will just print out that the complex number is 0.00000... idk how to fix it heres the main function [code=C] #include <stdio.h> #include "globals.h" #include "complex.h" int …

Software Development c
Member Avatar for jephthah
0
174
Member Avatar for jbisono

Hi, Im new here, im sorry if i am posting in a wrong forum, i have a piece of code that update a binary field in sql server 2000, im keeping this code a simple as possible, so this is working but only save the first character in the string …

Software Development sql visual-basic
Member Avatar for jbisono
0
282
Member Avatar for Prahaai

Good day. I have a problem with matrices / arrays, i cannot resolve. I have no idea how to start... I have two 2D matrices and i want to overlap (mix?) one over the other, no matter what dimensions they have. For example : a = [ (1,2,3,4,5), (9,7), (0,0,0,0,0), …

Software Development algorithm mathematics python
Member Avatar for scru
0
282
Member Avatar for waphon

this is an Object-oriented solution between ourselves of ai technique. Ai standard database chiefly contain: Main, Noun, Verb, Preposition Create database: Main. Create table columns 3 D memory x-axis, y-axis, z-axis, Class mark Input condition X Y Z Expected result X Y Z Reporting demonstration X Y Z Object enantiopathy …

Software Development c
Member Avatar for ArkM
0
171
Member Avatar for KirkPatrick

I have been having a little trouble getting my program to output the results I am wanting. At first I was having trouble with a cast exception at this line: [code]out = (ParseResult[]) ipHostsFound.toArray();[/code] The cast exception was: [code][Ljava.lang.Object; cannot be cast to [Lfilelocation.struct.ParseResult;[/code] So I ended up changing it …

Software Development java
Member Avatar for BestJewSinceJC
0
92
Member Avatar for Sky Diploma

Here is a comment stripper program from which takes input from Cin and removes the comments. [CODE=C++] #include <iostream> #include <fstream> char Getchar(); char var; int main() { char ch; do { Getchar(); switch(var) { case '/': switch(Getchar()) { case '*': Getchar(); while(true) { if(var=='*'&&Getchar()=='/') { break; } else { …

Software Development c++
Member Avatar for tux4life
0
331
Member Avatar for ulisse0

Sometimes [ICODE]_getcwd()[/ICODE] returns the parent direcory of the current one, other times returns the folder of the current user.. Has it ever happened to you-all? Thanks in advance

Software Development c++
Member Avatar for ArkM
0
506
Member Avatar for Lukezzz

I use this random generator for numbers but it seems that this generator isn´t really random because it seems to generate the same "Random" sequence chain every time I restart the application. Is there a better way to generate random numbers than this, that is more random ? [code] for( …

Software Development c++
Member Avatar for Lukezzz
0
225
Member Avatar for murrple_1

Hey All, I've been working on this code for a while now, but can't quite come up with a working solution. I'm trying to make a specially designed ImageButton, which extends JButton. Basically, it replaces the regular JButton image with another image. I've figured out everything except this. Every button …

Software Development java java-swing
Member Avatar for murrple_1
0
149
Member Avatar for Greeny28

Hi, I was hoping someone could correct my mistake. I'm trying to store references (or pointers should that be better) in a hetrogenous List. (The references or pointers will point to mixed classes). The problem is that everytime I store the pointer which holds a reference to the object, the …

Software Development c++ visual-studio
Member Avatar for Narue
0
141
Member Avatar for shaviraghu

hi all, i want to fill the margin area between the tabcontrol and tabpage with color.plz do help me. thank u. raghu

Software Development
Member Avatar for ddanbe
0
88
Member Avatar for meistrizy

Thanks in advance for your help. My code is doing some weird things and I can't figure out why. The purpose of my program is to have the user input any number and get the day of the week, month, day, and year and if that year is a leap …

Software Development c++
Member Avatar for meistrizy
0
128
Member Avatar for newcook88

can some one help me to develop the code for the following methods [CODE]private void add(Bucket bucket) { // is the bucket in the table? // can it be added to the table? // can the bucket be added at its hashed index? // what is to be done if …

Software Development java
Member Avatar for BestJewSinceJC
0
129
Member Avatar for freddiecool

Hi, i am making an event calender but i'm stuck with making sure that a user choose a valid date (a user should'nt be able to choose a start date that is after the end date). Could anyone point me in the right direction please? My code is still a …

Software Development java java-swing
Member Avatar for BestJewSinceJC
0
157
Member Avatar for Der_Kaiser

Hey there folks,I've been takinga course in data communications, which for the most part has been completely over my head, but anyway, for a project I need to write an instant messenger program. Prof as very vague about the detais, so I think It can be as simple as possible, …

Software Development client-server data-science gui java
Member Avatar for BestJewSinceJC
0
168
Member Avatar for jonnytabpni

Hi folks, I've created an application in VS2008 Express Edition. Some of my customers could potentially want slightly different features so I had the idea of moving the relavent stuff to a seperate dll (which works). The problem is when I swap the dll with a different one I get …

Software Development assembly
Member Avatar for JerryShaw
0
165
Member Avatar for Seamus McCarthy

Hey, i set up a circular queue to sort and pass ints easy, but having problems passing struct of information to the queue, wat declaration should i pass to insert function?? Here is my code so far, what would i change the int item to in insert function?? have just …

Software Development c++ queue
Member Avatar for Seamus McCarthy
0
162
Member Avatar for kaku_lala

Folks, I know we can use unsigned/signed int and char to define our own Boolean type in C. We can either use 0 or 1 to distinguish FALSE or TRUE or use TRUE as anything which is non-zero. Why can't I use float data type to define my own boolean …

Software Development c
Member Avatar for Narue
0
186
Member Avatar for amorphis88

Hello, i have 3 listboxes on my screen.. A listbox with emails from datasource A, a listbox with emails from datasource B and an empty listbox i want in the empty listbox the emails that are in A but not in B i've got this but it doesn't put any …

Software Development vb.net
Member Avatar for Teme64
0
691
Member Avatar for dev_kc

I need to call d class library on the click event of button,its in the same project,I don't know hw to call this,please tell me the steps which i need to follow for this,plz give sm examples,i m new to this....

Software Development
Member Avatar for ddanbe
0
90
Member Avatar for Rajesh1978

Hi, I am a computer professional. I have 3 years of experience in C++ on financial domain. I did not get a chance to work in networking domain. When I go for any change people are asking about the Networking domain and IPC programming. How can I master that though …

Software Development c++
Member Avatar for Ancient Dragon
0
121
Member Avatar for bokz06

i have a mydata.txt file with this in it: [ICODE]B.Friedel 38 LRC usa 20 1 1 1 21 410 300 300 300 18 0 1673 0 76 26 0 0 0 0 0 0 0 0 M.Fulop 26 LRC hun 17 1 1 1 26 308 300 300 300 1 …

Software Development java
Member Avatar for bokz06
0
5K
Member Avatar for finnj6

Hi all Im trying to insert an SQLDateTime into an SQL database column which takes DateTime here is an extract of my code [CODE]sTime = new SqlDateTime(DateTime.Now); command.CommandText = "INSERT INTO Sensors VALUES ('" + sensors[i].getName() + "','" + sensors[i].getType() + "'," + sensors[i].getVal() + ", " + sTime.Value + …

Software Development
Member Avatar for finnj6
0
467
Member Avatar for iceman29

Hi, I am writing a shell script, and need help with a small piece of code. It is as below: [code] CUST_1=filename b=1 c=$CUST_$b echo $c [/code] I want the output from this as filename, whereas I get it as 1. Please guide as if where am I going wrong …

Software Development shell-scripting
Member Avatar for iceman29
0
125
Member Avatar for Windkessel

Hi everyone, I'm trying to figure out how to pipe a filepath to the open command in TC Shell. What I'm trying to do is, to pipe the outcome of "which" (to find the current location of another script) to the default text editor. I tried [icode]which testscript.pl | open …

Software Development shell-scripting
Member Avatar for Windkessel
0
139
Member Avatar for mnkdpatel

I am studying C++ programing and i have a assignment which create a maze, which is a two dimensional array of size entered by user and the density also entered by user density is percentage of obstacle in the array. one mouse enter from the bottom of the array from …

Software Development c++ pdf
Member Avatar for iamthwee
0
79

The End.