132,726 Archived Topics
Remove Filter ![]() | |
I want to shorten the lower half of this code into a loop statement. The only(x) function is an imported function that makes sure 1 to 9 occurs only once. [CODE] num_1 = str(raw_input("Enter set 1: ") num_2 = str(raw_input("Enter set 2: ") if not only(num_1): ##These two "if not … Software Development python | |
Hi guys, I know what is meant by vector <string> myvector as it will just take every inputs as string when we are trying to store the inputs in myvector. e.g. myvector.push_back(nick) but what about if we declare the type of vector become like vector <FLATMATE> myvector? Why it won't … Software Development c++ | |
What is a differrent between sorted and unsorted lists? The important points... Software Development c++ | |
[CODE]i have problem in running c++ program.iam getting more errors .can u help me to run it.[/CODE] | |
Could someone please give me some advice as to why, when I run my program I get a segmentation fault? The code is posted below: #include <stdio.h> #include <stdlib.h> #include <iostream> using namespace std; typedef float Elem; struct Vector { unsigned short int size; Elem* array; }; // Instruct user … Software Development c++ | |
i want to reserve 4096 bytes in the memory and initialize all with zeros how should i do that? initialize: mov byte[array:di],0 inc di cmp di,4096 jne initialize array: resw 4096 Software Development assembly | |
I would like to program that reads a file with 6 lines that have 7 numbers on each line. The output should save a file with sum, average, max and min of each line. For now I just have to figure out how to get the max and min numbers … Software Development c++ | |
In the name of God ...................................... Hi this is my code . i want to add 2 digits and then print them on screen : what's wrong : [CODE] title myprog .model small .stack .data num1 db 12 num2 db 13 .code start : mov ax,@data mov ds,ax ; data … Software Development assembly | |
Hi guys, I just started to learn class in C++ and get confused by some of the codes [code]class FLATMATE { string name; public: FLATMATE() { name = "";} FLATMATE(string n){name = n;} string getName(){return name;} void setResident(string n){name = n;} }; //Below are the base class for different duty … Software Development c++ | |
Hey guys, i'm fairly new here. Just stuck on a program. It seems like it should be right, based on my pseudo code, but something went wrong. Edit: without using Math.pow; Edit: kind of not looking for the answer, just what i did wrong,, other wise, i wont know it … Software Development java | |
Can someone explain this short paragraph concerning wave file analysis (what exactly is the input and output?): The default input to this program is a text file containing a uniformly sampled time series, presented as a column of numbers. The default standard output is the magnitude of the discrete Fourier … Software Development c | |
I'm working on an a grading program that will require the use of a couple classes. The program contains a list of "program assignments" which there are 5, and 3 test scores. The Driver class contains the scores for the students. I'm stuck writing the average methods :$ Along with … Software Development java mathematics | |
The file that I am trying to read has the following contents: 192.168.1.1 48111 test.out 100 25 I am trying to use fscanf to read it line by line and storing each line in a variable. This works if I just have a couple of int variables, but it does … Software Development c | |
Hi....... This code is useful to check given string is palindrome or not. Actually, there are some other way also to check palindrome. So, be careful which code gives better efficiency. You can [COLOR="Red"]comment the line[/COLOR][COLOR="Green"]-bool caseignore= str.Equals(revstr, StringComparison.OrdinalIgnoreCase);[/COLOR] and in [B][COLOR="Red"]if[/COLOR][/B] condition you can use- if(string.Compare(str,revstr,true)==0) Software Development mathematics | |
Hi, This is what I have done so far (below) I'm having a problem with the spacing as shown in the output (below the code) Can anyone please help me fix the spacing? Thank You!! ************************************************** ************** CODE: [CODE]#include <iostream> using namespace std; void question (int input); void calendar (int … Software Development c++ | |
Please check out This Output required [CODE] Aa Cc Bb Dd Ee Ff jj Ii Hh Gg [/CODE] [CODE] #include<stdio.h> #include<conio.h> void main() { char a = 'a',a1 ='a',A = 'A',A1='A'; int i,j,n; clrscr(); for(i =1;i<=4;i++,printf("\n")) { if(i%2!=0) for(j = 1;j<=i;j++) { printf("%c%c ",a,A); a++; A++; } else { a1 … Software Development c | |
| |
[CODE] public class Node { int iData; double dData; Node leftChild; Node rightChild; public void displayNode(){ System.out.println(dData); } } [/CODE] [CODE]public class Tree { private Node root; //the root of the tree public Node find(int key) // find node with given key { // (assumes non-empty tree) Node current = … Software Development java | |
I have just started taking Java as a course in college and I am having a problem understanding how to find the syntax errors in a definition for a class.I am not asking for answers I just need help understanding it more. The class is public class AA { private … Software Development java | |
Hey, I have a homework problem in which I have to multiply two polynomials. I am assuming that the 2 polynomials can each be of any length so I am stuck as to how I am supposed to do that. My homework sheet derives how to do it like this … Software Development python | |
I want to pass some variables from the child form to the parent form. So at the Main form or Parent form I added the variables as a constructor: [CODE] private SampleFunction() { int a, b; //Here is where I want to use the x,y and z from the Second … Software Development | |
Hi i have a small calculator app .that add 2 values from the user input.(a windows application on C#). And now what i want is to access that calculate method on a web site,witch is run on my local host. so plz.....somebody can help me........ Software Development | |
hai, i was wondering if you guys had any advice on getting into game programming with c++ i have a pretty basic understanding of the language and was trying to find out how to do this kind of stuff but so far i havnt been able to find out much. … Software Development c++ | |
Is this possible or are there any ways for this? I need to insert records in two tables using SQL. I believe that having two sqlcommands must have different name so if there would be two of it, how could I execute both. Software Development | |
I am currently working on a C# project that contains UDP and TCP connections, and outputs to a serial port,... etc... So I was thinking ... How hard is it to take a C# program and convert it somehow to be embedded on a circuit board? ... i.e: replacing the … | |
hello...i`m a new beginner in c#, is anybody know how to...... i`m trying to create a table. the table have one INSERT button. when i click the INSERT button, an empty row will appear below the previous row, which i have to insert a new data. so now what i … Software Development | |
Hi !!! I have two Windows Forms. In First Windows Form i have one Text Box and one Button. In the Second Windows Form i wish to call First Windows Form and get the value of Text Box. Is this is possible? When i create a object of the First … Software Development | |
[COLOR="Red"]hey,i'm having trouble with this code...it keeps saying there is an error..can you help me please...thank you in advance[/COLOR] cannot find symbol symbol: constructor CompteBancaire() location: class javaapplication18.compteBancaire this is the class: [CODE] package javaapplication18; import javax.swing.*; import java.util.Scanner; public class CompteBancaire { private String nom,prenom,typecompte,currency; private int numerocompte; private … Software Development java java-swing | |
hello all, actually i am working on sipmle work inwhich i need to import one file whic is of .hex extension, so i need to import a file which should be exactly same name with .hex extension. how should i implement such that it should take that file name with … Software Development c | |
Can a String object behave like other reference objects such as in the case below? [code] class MyClass { public String Text = ""; } MyClass a = new MyClass(); a.Text = "Text in a.Text"; MyClass b = a; b.Text = "Text in b.Text"; Debug.WriteLine(a.Text); // Prints 'Text in b.Text" … Software Development | |
CREATE procedure [dbo].[date_sp_new] ( @fromdate as varchar(50), @todate as varchar(50) ) AS declare @date1 as datetime declare @date2 as datetime select @date1 = convert(varchar(50), @fromdate,120) select @date2 = convert(varchar(50), @todate,120) begin if (@date1 = '' or @date2 = '') select * from mkt_contact else if(@date1 != ''and @date2 = '') … Software Development | |
Im from a c++ backround so I am not sure exactly how to do what Im trying to accomplish. If myString1 = "hello" and myString2 = "hello\0\0\0\0\0\0\0" Im looking to trim off all of the null charecters. Thanks. Edit: So i was just trying to use the Remove method. I … Software Development | |
i need help to solve this #include <stdio.h> #include <stdlib.h> void toLowerCase(); int main() { system("cls"); toLowerCase(); return 0; } void toLowerCase() { char ch, ch1; printf("\nEnter a character to convert: \n "); scanf("%c", &ch); ch1 = ch+32; printf("Converted value is %c", ch1); fflush(stdout); } Software Development c | |
Hey guys, ive just started learnng c++ after a year or so of java, one issue that has just cropped up for me is repeating input from console. if for example i ask for an input, expecting just 1, and the user inputs 2 with a space inbetween how do … Software Development c++ | |
[CODE]list=[] list_start=[[1,2], [2,2], [1,3]] for element in list_start: list.append(element) list[0].append([2,3]) print "list=", list[/CODE] The result is, list= [[1, 2, [2, 3]], [2, 2], [1, 3]] instead of list= [[1, 2], [2, 3]], [2, 2], [1, 3]] If check: >>> list[0] [1, 2, [2, 3]] >>> list[0][0] 1 >>> list[0][2] [2, … Software Development python | |
Hey I have a videorental program and each video object should have an display image. [CODE]private Image VideoPicture;[/CODE] I searched the web for tutorials, but couldn't find any. I know how to use the file input dialog, but how do I assign the image to the CarPicture. I haven't figured … Software Development image | |
3. How many 3 digit numbers are divisible by 17? Write a function to print them and return the sum. (The sum being the sum of the 3 digit numbers that are divisible by 17). 4. Write a program that does the following to an image: changes black pixels to … Software Development python | |
pls,i need help in inserting a date from a text field using java, to mssql database. i am getting incorrect date for example when i insert 13/3/2010,i am getting the date 1/3/2011.i want a solution,i've searched a lot but useless. the code is: [CODE] try{ java.util.Date d; String s; d … | |
I write some coding i want to get 2 output like Example (1) of object Employee: Id# Name : Age: Sex: etc. Example (2) of object Employee: Id# Name : Age: Sex: etc. i just dont want a long code.. … Software Development java | |
[ICODE]import random import itertools def test(number): return random.random()*number [/ICODE] Say I have a function and I want to repeat it x times so that I may calculate the standard deviation. How can I do this? I've tried using itertools.repeat(test(5),3) but it prints repeat(value,3) which I can't calculate the standard deviation. … Software Development python | |
Hi guys, I am relatively new to Python. I am trying to code a program in Python and part of it involves checking that each input only have the characters 1 to 9 occuring only once. My code are as follow: [CODE] for i in range(1,3): num = str(raw_input("Enter row … Software Development python | |
So I have an assignment to redefine an array-based Stack push() function. The problem itself sounds like it totally defeats the purpose of a stack, but this is what I have been assigned: Rewrite the push function so 'myTop' is always 0 instead of one more than the index of … Software Development c++ | |
If I already have a JListBox set up, but the text is too small, how do I make the font of the elements larger? Software Development java | |
I have this method to see whether not the year is a leap year or not. heres the code i get the error missing return statement at the end. What can i do , i can't add return true or return false, becuase that screws it up. public boolean isLeapYear() … Software Development java | |
I need to write code that can determine if an IP address is in a subnet based one the subnet address and mask. I don't even know where to begin with this, so any tips would be appreciated. Thanks. Software Development c++ | |
i have been in a java course it´s kinda expensive but anyways i am thinking that im going to quit cause its not hard but its really overwhelming dont you get that feeling?, theres just to much to learn!, i cant believe people learned more than 1 programming language also … Software Development java | |
I have given instructions to write some code and i have to follow the comments giving and i get stuck and some point so can anyone tell me what i did wrong /* * Returns the percent change from the original to the desired servings. * The percent is expressed … Software Development c++ | |
[CODE]import java.awt.*; import java.awt.event.*; import java.awt.image.*; import java.io.*; import java.sql.*; class MyCanvas extends Canvas { Image img; public MyCanvas(Image img) { this.img = img; } public void paint (Graphics g) { if (img != null) { g.drawImage(img, 0, 0, 1000, 1000, this); } } public void setImage (Image img) { … | |
Project Makcik Minah has opened a new children art class. During the Registration Day, 30 children have registered. Makcik Minah’s assistant, Munah has manually obtained information from the children that include name, birth certification number, date of birth and gender. All these information is required in order to divide the … Software Development c++ |
The End.