43,549 Solved Topics
Remove Filter ![]() | |
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 … | |
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 | |
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 | |
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 | |
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++ | |
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 | |
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 … | |
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 … Software Development algorithm c c# c++ programming-construct visual-basic | |
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++ | |
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 | |
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 | |
![]() | 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 ![]() |
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 … | |
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 | |
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 | |
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 … | |
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 | |
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 | |
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 | |
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 | |
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. | |
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++ | |
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 | |
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 ![]() | |
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 … | |
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 … | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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++ | |
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 | |
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++ | |
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 | |
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 | |
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 ![]() | |
[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++ | |
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 … | |
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 ![]() | |
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 | |
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 ![]() | |
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++ | |
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 | |
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 | |
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++ |
The End.