43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for miku003

I'm trying to make an array-based queue that inserts and removes the elements... The default array is {0,0,0,9,10}. after the 0's are filled up it should say that its Full and will return to the loop. I'm having trouble making 3 particular methods which is dequeue, isEmpty, and isFull.. [CODE]class …

Software Development java queue
Member Avatar for miku003
0
189
Member Avatar for novice20

Hi, I have a for loop something like: [CODE]for n in range(no_of_rows): #--configuring ODU Op mode odu_op_mod=list1[n] odu_op_mode= odu_enum["%s"%odu_op_mod] if (odu_op_mod == 'blahblah'): #------------ elif(odu_op_mod == 'aaa'): #-------- elif(odu_op_mode =='xxx'): #----- elif(odu_op_mod == 'yyy'): #------------------- elif(odu_op_mod == 'zzz'): #------------- logging.info("*******************************************************************") subprocess.call(['python link_config_idu12.py %s'%addr],shell=True) [/CODE] I have different lists, list1 #for …

Software Development python
Member Avatar for novice20
0
3K
Member Avatar for maye13

This code is part of this program I'm doing. I've edited it so it would get shorter. [code] #include<stdio.h> #include<string.h> main() { char zero[5][6] = {"|||||", "| |", "| |", "| |" , "|||||"}; char secOnes[5][6]; strcpy(secOnes,zero); y=10; for(i=0;i<5;i++){ gotoxy(20,y++); printf("%s", secOnes[i]); } getch(); } [/code] When I try to …

Software Development c
Member Avatar for castrogang
0
1K
Member Avatar for f_atencia

Hi peoples, Suppose I have an XML file [CODE] <Application> <Segment1> <ID>Sam</ID> <Fee>2.50</Fee> <Fee>1.00</Fee> </Segment1> </Application> [/CODE] In a nutshell, I want to move the two <Fee> Elements to another section so it looks like this; [CODE] <Application> <Segment1> <ID>Sam</ID> </Segment1> <Segment2> <Fee>2.50</Fee> <Fee>1.00</Fee> </Segment2> </Application> [/CODE] It would invlove …

Software Development xml
Member Avatar for mrame
0
133
Member Avatar for ahtaniv

Hello all, My understanding is that the Objects created are stored in the heap segment. What if the objects are created for a class with static data members? Do the static data alone reside in the data segment, while the rest of the members are allocated on the heap? I …

Software Development c++
Member Avatar for ahtaniv
0
372
Member Avatar for xZombeast

I made my IO exception and everything to copy a file to an existing spot and then overwrite it. I programmed the IO fine, but I get the error saying 'File in use' [CODE] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; …

Software Development file-system
Member Avatar for rohand
0
133
Member Avatar for kinz653

Hi, Just started using python. I can run simple python programs from the terminal in OS X. It says python version 2.6.1. I wanted to try turtle. I copied some code I found from others on here and tried to run it, and ran into problems right away with things …

Software Development os-x python
Member Avatar for kinz653
0
3K
Member Avatar for EneilShade

I was humming along, and decided to try out data sorting. So, I did a few pieces of research, and came up with a really cool looking algorithm: Quicksort. I did what I should have, and started to program. Now, here is where I sound like an idiot: Why is …

Member Avatar for EneilShade
0
223
Member Avatar for winky

I am trying to make an ATM machine, while trying to teach myself how classes interact with each other. I feel as though the main idea of the program is correct, but as you can see, I am having a lot of syntax errors. If you guys see something that …

Software Development c++
Member Avatar for chrjs
-2
3K
Member Avatar for Jollyyy100

I'm currently using a combo box to select one of many alternatives. From 5 alternatives only 1 works, when i click on any other it gives me the following error: "Cannot bind to the property or column 'xyz' on the DataSource.Parameter name: dataMember" Why is this error caused? What are …

Software Development vb.net
Member Avatar for Pgmer
0
143
Member Avatar for gingank

Datagrid Adding Columns this is a really silly question, but i seriously dont know how to do it. How do i add a new column to a datagrid. It starts off with two, and all i want to do is add two more columns to it. why am i finding …

Software Development visual-basic
Member Avatar for asd111
0
107
Member Avatar for Amoryethel

Hi. I'm making an interface and a class that correlates with the client code below. Everytime I try to compile the client code, I get the following errors: [quote] Bird.java:15: = expected private Color col; ^ Bird.java:16: = expected private Point pos; [/quote] As well as a few others. For …

Software Development java
Member Avatar for Amoryethel
0
145
Member Avatar for chaosgeneration

I have an assignment to show a brute force algorithm on combination and permutations. All I am given is the function headers, and I cannot see the main. I'm having trouble understanding how sets work... Here is my header function for combination [code=c++]set< set<char> > powerSet(set<char S>)[/code] now, I'm not …

Software Development algorithm c++
Member Avatar for pseudorandom21
0
170
Member Avatar for jpaulsen

i know nothing about programming but started learning python yesterday, and have learned some basic things. my dad is a programmer and challenged me to write a program that would be like '20 Questions'. i started it using the few things i know, and i think the way i started …

Software Development python
Member Avatar for woooee
0
157
Member Avatar for eikal

Hey guys, im doing a rock paper scissors program for h/w i got it done but im getting an error and i cant figure out whats wrong. [code] public static void main(String[] args) { int pcpick; int userpick; String userChoice = JOptionPane.showInputDialog("1 Rock, 2 Paper, 3 Scissors"); int choice = …

Software Development java
Member Avatar for eikal
0
184
Member Avatar for KazenoZ

Hello, Once more, I'm having a problem which I've been breaking my head about for a few hours searching Google to no avail, and came here again for some consult about. The thing is this; I have an image file, the size of 16x16 pixels, and I want to paint …

Software Development c++ image
Member Avatar for jonsca
0
697
Member Avatar for Sonny101

Hi all, I cannot seem to grasp the use of wrapper classes, or rather how to use them. I am in the middle of practicing for an exam tommorrow but I am a little stumped with the following task: [I]Create an overloaded setValue method that recieves a String parameter. This …

Software Development java
Member Avatar for jon.kiparsky
0
147
Member Avatar for MARKAND911

I have a Datagridview in C# windows Application In it i have one ComboBoxColumn out of 12 datagridview columns Now I want to disable/enable cells of particular row on ComboBoxColumns selected index chaged event according to Condition. Not Gridview's whole column should enable/disable, I want Cells of particular selected Row …

Software Development
Member Avatar for Mitja Bonca
0
2K
Member Avatar for discovery-power

Hi All, I want to add some admin privaliges to my program, its simple enough, when the user is logged in as admin certain buttons are enabled, when the user is logged in as anyone else, these buttons are disabled. Please see my code below [CODE] Private Sub MRMMain_Load(ByVal sender …

Software Development vb.net
Member Avatar for discovery-power
0
106
Member Avatar for Lourdupinto

Hello friends kindly help me, Which is purely object oriented language Java or c++? If it is java why it is? how it is? If it is c++ why it is? how it is? Kindly help me...........

Software Development java
Member Avatar for Lourdupinto
-3
151
Member Avatar for zizuno

I have been told by a number of people to use xpath instead of regex for some of my regex searches. What advantages does xpath provide over regex? I can't find a webpage that says that. Been through over 10 pages of search so far.

Software Development python regex
Member Avatar for richieking
0
614
Member Avatar for JordanHam

I do not know if I should use a 2D or just two seperate arrays to make this easier. I have two arrays. One is just an array like {1,2,3,4...n} and the other has values that correspond to those and make pairs. I want to create an array that stores …

Software Development c++
Member Avatar for JordanHam
0
203
Member Avatar for hqrtt

Hi I've got a strange problem that i'm going to explain but before, here is my code: /!\ This is not my finished application /!\ [CODE]#include <windows.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <conio.h> struct Date { short Jour; short Mois; short Annee; }; struct Ouvriers { char Genre; …

Software Development c
Member Avatar for hqrtt
0
180
Member Avatar for nuBudDy

hi, i need help on calendar picker.i placed a calendar control on a form.once i click on any date,i want the date value to be inserted into fields in database.i tried searching for the codes bt what i got was a manually designed calendar by a programmer.is it possible to …

Software Development microsoft visual-basic
Member Avatar for ask_girl
0
527
Member Avatar for LoveMyPadres

Hi I posted this on another thread but messed up the title (called it y2exe) and I want to make sure this gets found if someone can help. I'm using py2exe and pysnmp, and they seem to be incompatible, at least on the oneliner form I'm using. Pysnmp claims to …

Software Development python tkinter
Member Avatar for LoveMyPadres
0
424
Member Avatar for RobZombie85

Hi Iam running into a problem when using classes and inheritance. I have a base class which contains a member function whos job it is to create and intialize some variables that are shared between other classes. The other classes are inherited from the base class and the variables are …

Software Development c++ oop
Member Avatar for Narue
0
154
Member Avatar for anumash

This program is based upon the quadratic equation. If I enter a negative discriminant it prints NaN instead of "No real solutions". Any help will be appreciated. Why is it printing NaN twice??? What modifications are needed in the code? Please help!!! [CODE]import java.util.Scanner; class QE{ private double d=0; private …

Software Development java
Member Avatar for anumash
0
121
Member Avatar for suman.great

My script is as follows : [COLOR="Red"]echo " enter the directory path of file " read DIR_PATH path=$DIR_PATH cd $path echo "">/tmp/df_mac echo " enter the name of file" read EXCEL_FILE echo $EXCEL_FILE src_file=$EXCEL_FILE count=`expr 1` one=`expr 1` while read line do IDX=`expr index $line \/` echo $IDX echo $line …

Software Development shell-scripting
Member Avatar for suman.great
0
171
Member Avatar for jonsca

I recently was using the BinarySearch method and I was curious about why the designers had coded the method with the following for a return value: "Return Value The zero-based index of item in the sorted List, if item is found; otherwise, a negative number that is the bitwise complement …

Software Development
Member Avatar for ddanbe
1
125
Member Avatar for standa333

Hello, i´m beginer in XSL and i need help. In attachment, is source xml and my xsl. I have problem with filtering element date. Because, when i run transform result is duplicate. Can you help me? thx Stan

Software Development xml
Member Avatar for standa333
0
134
Member Avatar for KKR_WE_RULE

The output I am getting is : [CODE]You will be entering the names of ten students their corrsponding marks in Physics, Chemistry & Maths. Enter the name of the student : student1 Enter the marks in physics of STUDENT1 : 43 Enter the marks in chemistry of STUDENT1 : 54 …

Software Development java
Member Avatar for KKR_WE_RULE
0
142
Member Avatar for pssubash

Hi, I created a class named [B]Test.java[/B] [CODE] public class Test { public Test() { System.out.println("Testing......"); } } [/CODE] It sucessfully compiles. Then i create another java class [B]Menu.java [/B]and here i trying to create an object of the Test class. [CODE] class Menu { public static void main(String[] args) …

Software Development java
Member Avatar for javaAddict
0
328
Member Avatar for stroper

I am making a console application. I want to make a method to stop the application. Can anyone help please. This is my code. [CODE]public void menu() { System.out.println("1 to go to menu help, 2 to go to head menu 3 to stop"); int optie = scanner.nextInt(); switch (optie) { …

Software Development java
Member Avatar for stroper
0
129
Member Avatar for xuexue

could you give me a syntax for insert into using db2 as the database and vb6 as it's front end? i am trying to insert a numeric value to my table coming from a host variable in vb6, however, i do not get the proper syntax for it..could you help …

Software Development visual-basic
Member Avatar for AndreRet
0
124
Member Avatar for elsiekins

Hi, i have: [CODE]string letter; cout << ">Please enter a letter: \n>"; getline(cin, letter);[/CODE] What i am trying to work out is how to restrict the user for only entering one letter - has to use a string due to being used in a function later which only takes a …

Software Development c++
Member Avatar for elsiekins
0
176
Member Avatar for mangopearapples

Hi, for some reason, my JScrollPane isn't working with mt JTextArea. Probably the most important part: [CODE] JTextArea TextArea; JScrollPane scroll; TextArea = new JTextArea(); scroll = new JScrollPane(TextArea); add(TextArea,BorderLayout.CENTER); add(scroll,BorderLayout.LINE_START);[/CODE] Whole code if you're interested in what I'm making: [CODE]import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.BufferedReader; import java.io.BufferedWriter; …

Software Development java java-swing
Member Avatar for mangopearapples
0
280
Member Avatar for jkoske

This is giving me a segmentation fault in the noBucket() function. I don't see why. Does it having something to do with it being a const function? My other accessor functions are working fine and they are declared exactly the same with just a different name. The files are longer …

Software Development c++
Member Avatar for jkoske
0
216
Member Avatar for eduard77

I have a vector that with your help I succeeded to make it work just fine. Now I want to make the same vector to work with float values but just doesn't want to make me the mathematics with float numbers. Is adding only the integers and not the float …

Software Development c++ mathematics
Member Avatar for eduard77
0
112
Member Avatar for xuexue

front end: Visual Basic 6.0 [CODE] Dim intAmount as integer intamount = val(txtamount.text) [/CODE] Back end: AS/400 db2 library: CPALLIB field: amount type: Numeric Len: 9 Decimal: 2 value: 100000 The problem is that when i insert new record to my database for this field: (amount), the value is 100000. …

Software Development visual-basic
Member Avatar for debasisdas
0
228
Member Avatar for sj5536

How do i count space between two string in java for ex. String s = "This is my car"; i have to count number of space between this and is , is and my, and my and car.

Software Development java
Member Avatar for ztini
0
2K
Member Avatar for vin24

Guys, how to retrieve a text file in java???

Software Development java
Member Avatar for ztini
0
137
Member Avatar for ahtaniv

[CODE]class A { public: int a; A() : a(100) { } }; class B : public A { public: int b; B() : b(200){ } }; int main() { A a; B *ptrB =(B*)&a; cout<<ptrB->b<<endl; // Is there a way to get this to print 200?? }[/CODE]

Software Development c++
Member Avatar for ahtaniv
0
278
Member Avatar for jordan0420

Im building a database to hold files i am using anydbm and what i would like is something that does this: [CODE= Python] import Tkinter import anydbm import tkFileDialog file = tkFileDialog.askopenfile(parent=None,mode='rb',title='Choose a file') print file print str(file) db = anydbm.open("database", "c") # db["1"] = str(file) for file in files …

Software Development python tkinter
Member Avatar for jordan0420
0
159
Member Avatar for Taimoor Rana

I want to load an image for each different shoe and I'm using JLabel to help me do this. I put the image's path in the JLabel constructor but when the code runs, it doesn't display any image. Instead of an image, the image path is written. appreciate any help …

Software Development image java java-swing
Member Avatar for ztini
0
246
Member Avatar for Josef01

I am learning vb.net from tutorial sites, book and having trouble to delete row from datagrid view. can someone help me how to delete a selected row in datagrid on click of a button .Thank you the error i get : 'user' is not declared [code] Private Sub Button3_Click(ByVal sender …

Software Development vb.net
Member Avatar for Josef01
0
4K
Member Avatar for atticusMom

Searched online and found ways that people are able to do this but I can't seem to get mine to incorporate all the words. Here is what I'm trying to do followed by my 7th try at coding it. Thanks in advance for any advise you may be albe to …

Software Development java
Member Avatar for ztini
0
170
Member Avatar for iamthesgt

In my program that uses separate compilation, the only problem I have left is a linker error. To see if it was just a syntax error somewhere obscure, I made a simple "hello world" program that uses separate compilation. I get the same error. The code is below. If someone …

Software Development c++
Member Avatar for iamthesgt
0
629
Member Avatar for RodEsp

Hey guys, so I'm trying to write a little program that will put together any number of strings passed to it into a single string and then print out that string backwards. I think I have everything correct but I keep getting a "Segmentation fault (core dumped)" error after compiling …

Software Development c
Member Avatar for RodEsp
0
1K
Member Avatar for C#Jonathan

Hi, I've just migrated an application to Visual Studio 2010 and upgraded a third party add-on called Visual WebGUI to .Net 4. I now have a problem with assembly references to the third party DLLs The latest version of the Visual.WebGui.Forms DLL for example is at 4.0..... . Our application …

Software Development assembly visual-studio
Member Avatar for C#Jonathan
0
149
Member Avatar for eduard77

I have a vector defined like this: [CODE] #include<iostream> #include<vector> using namespace std; typedef vector<int> VECTORINT; int main() { VECTORINT Vectorul; int x; int num; int y; cin>>num; //the number of numbers that must be entered for(int i = 0; i<num; i++){cin>>x; Vectorul.push_back(x); for(int i=0; i<Vectorul.size(); i++) cout<<Vectorul[i]<<endl; } system("pause"); …

Software Development c++
Member Avatar for eduard77
0
113

The End.