43,549 Solved Topics
Remove Filter ![]() | |
Hi, I'm pretty new to windows programming, and I'm trying to learn from an example. However, I'm encountering some compiler errors that I think are caused by my strings not being made up of wide characters. (correct me, i could very easily be WAY off) winMain() requires parameters of the … Software Development c++ | |
I have an array which collects a name and a mark,I want to use a method to get the total of the array, I assume this can be done I have googled it but it doesn't really give me an answer. heres Main [code] static void Main(string[] args) { Student[] … Software Development | |
I am doing a Java project and in my gui I want to use Buttons. I want to put a class' internal parts code as a button action. Because the class Throws Exception when I copy the contents of the class under the button definition I encounter unreported exception error. … Software Development gui java java-netbeans | |
This has probably a simple solution, but i cannot find any obvious wrong. This is a simple button event and the supposed output in Label5 should be: One Two Three. Now, I can only get "Three", the last value in the array. [code] protected void Button4_Click(object sender, EventArgs e) { … Software Development | |
[CODE] #include<stdio.h> #define COUNT 5 void enter(int *p_arr); void report(int arr[], int count); int main() { int arr[5]; int i; for(i=0; i < COUNT; i++) { enter(&arr[i]); } report(arr, COUNT); } void enter(int *p_arr) { int i; int insert; printf("\nplease enter the number:"); scanf("%d", &insert); p_arr[i]=insert; } void report(int arr[], … Software Development c | |
I am currently taking a C++ program at my college and it all just seems foreign to me. I am having some trouble with this problem.. The Yukon Widget Company manufactures widgets that weigh 9.2 pounds each. Write a program that calculates how many widgets are stacked on a pallet, … Software Development c++ | |
I have two strings s1 and s2. I have to check what is the largest occurence of letters in s2 that are in s1. For example: s1="xyz" s2="abxyryxzycx" it would then return 4 since "yxzy" is the largest substring with all the letters in s1. It has to be recursive. … Software Development java | |
Is there a way to add a directory to the locations that python look at when you call __import__ ? I need to import some scripts from a user folder at runtime, and since __import__ doesn't accept absolute file names, I'd like to try this. Copying the script to the … Software Development python | |
How do you convert a character type into a string type?? Software Development java | |
[CODE] import java.io.*; import java.util.*; public class Palindrome { public static void main(String[] args) throws IOException { char letter; String reversed,NEW; Stack S = new Stack(); BufferedReader stndin=new BufferedReader(new InputStreamReader(System.in)); System.out.print("Enter a word: "); String word=stndin.readLine(); for(int i=0; i<word.length(); i++){ letter = word.charAt(i); //this line should cut the 1st letter … Software Development java | |
I know the codes not the best well written but the only problem I'm having(besides the interpreting of the macro commands, the one here is just a base for me to work on) is how the UpdateLabels.start() method returns: [code]Traceback (most recent call last): File "C:\Users\Erik\Desktop\Stuff from last Night\MouseMacro.py", line … | |
Hi! I am trying to initiate a client-server talk but for some reason it is not working. The server starts running, but when I start the client nothing happens. Please point out the mistake in my code- Server- [code="java"] import java.io.*; import java.net.*; public class MyServer { public static void … Software Development client-server java socket-programming | |
hello again, Ive got the basics under my belt and ready to start making things happen:D. I want to experiment with different things so could you show me to some good tutorials on some of the following things. 1. sending and receive messages through the internet-what library/Mod should i use? … | |
hey! I`m a beginner in Java and I want to write a program that use try and catch method to send a msg if the average it calculate is not in [0-20] I have already write this code but it always print 0! what is wrong with my code?!!! [ICODE]using … Software Development java | |
Hey, i am working on a project in which i am making a minesweeper game. The game part was written by my prof. all i had to do was make the class and header to run the background of the game. I have done so successfully, but i am having … Software Development c++ | |
Hi, Guys I am a beginner please help me. I wrote something like this: [CODE=cplusplus] #include <iostream.h> #include <string.h> #define number 1 #define length 35 char student[number][length]; int i,j,k; char *BlankImprover(char *); void InsertInfos(void); void main(){ InsertInfos(); for(i=0;i<number;i++) for(j=0;j<15;j++) cout<<student[i][j]; } void InsertInfos(){ char name[15]; for(i=0;i<number;i++){ cout<<"Enter Student Number <"<<i+1<<"> … Software Development c++ | |
can anyone tell me the code how to create a textpane with scrollbars inside a tabbed pane.....and i should save the text in a file on button click.... Software Development java | |
Is there any way that I can get PERL to give me the elapsed time that it took to calculate something? I'm trying to make my algorithm for finding prime numbers more efficient, and obviously I can't tell the differences in the time it took to generate the list, so … | |
Hello, I am creating a client/server application that verifies math equations for addition, subtraction, and division. I think I just need someone else’s eyes to possibly see where I am going wrong with this. Everything seems to be working fine except for one variable. This is the String serverAnswer variable … Software Development client-server gui java java-swing | |
I have all my code for this. I have the code to read a txt file, write a txt file, convert the infix to postfix and evaluate it. I am now just having trouble putting it all together. I need it to read the text from a file convert each … Software Development file-system java | |
Is there any way to insert an empty line in a string type variable. string textFile = "abc"; textFile = textFile + string.Empty; textFile = textFile + "def"; This is what I'm trying. But the string.Empty has no effect. This also neither works textFile = textFile + "\n"; Any suggestions? Software Development | |
When building classes I thought if I just added an enum to the parameter list it would pop up the list of the enums, sort of like intellisence.. But I clearly am missing something.. [code] public enum eFullWeekDays { Sunday = 1, Monday = 2, Tuesday = 3, Wednesday = … Software Development | |
can you please give me an article address which tells when to use stack and when to use heap, how to use them properly and the performance issues related to usage. Thanks Software Development c++ | |
Hi! I have a problem to make a list of students (i know how to put all the input and to calculate the average of the students grades) but i don't know how to put the students in new list arrayed by their average form biggest to smallest and if … Software Development c++ | |
what is the usual cause for "out-of-line member function declaration" compiler error? Software Development c++ | |
QUESTION: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? I was trying to solve this problem. I was previously suggested to use the "Sieve of Eratosthenes" Method to find the prime nos. [url]http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes[/url] I came up … Software Development c++ visual-studio | |
how do i learn programing?eventhough how hard i try to understand the languages, i can not absorb it, pls help me about it Software Development visual-basic | |
[CODE] import javax.swing.*; public class A { public static void main (String args[]){ String ask = JOptionPane.showInputDialog("Enter"); if(ask.equals("hello")){ System.out.println("ok."); main(args); }else if(isRepeat(ask)){ System.out.println("Invalid,string has been repeated."); System.exit(0); } } public static boolean isRepeat(String ask){ if(ask.equals("hello")){ return true; }else{ return false; } } } [/CODE] Hello, I am having problems with … Software Development java java-swing | |
I have a class derived from a TableLayoutPanel and if I have more than 3 rows or columns I don't show them directly, I add(I let the object add) scrollbars so I can reach the other cells. I have code that works perfectly,but... [CODE=csharp]public void CalculateSize() { const int cMaxCol … Software Development | |
hi all, i used the search function, but the threads i found didnt really help me much since i am quite a newbie and didnt understand how it worked. so what i am trying to do seems simple but it doesnt work. i have a textfile with a single line … Software Development c | |
I am trying to construct a class and call upon some functions within that class, but nothing is returned, somehting should definitely be returned [CODE] #!/usr/bin/python import cElementTree as ET import urllib2 import MySQLdb print "Content-type: text/html\n" class xml: @staticmethod def find_text(element): if element.text: yield element for subelement in element: … Software Development hardware-swap python xml | |
hi everyone, im very new to vb.net. i have a textbox and a save button on my form. i have already connected the database to my application... pls can any1 tell m how do i save the data in the textbox to my ms access databse when i click on … Software Development vb.net | |
![]() | i cant figure out what's wrong with my code. can anyone help me pls? [code] import javax.swing.*; import java.awt.*; import java.awt.event.*; public class MyGUI implements WindowListener, ActionListener { public void windowClosing(WindowEvent e) { System.exit(0); } public void windowClosed(WindowEvent e) { } public void windowIconified(WindowEvent e) { } public void windowOpened(WindowEvent … Software Development java java-swing ![]() |
Hi all, I have created a simple SQL Server database by Visual Studio 2005, with one table 'Friends' that has just ID, Name, Phone, Email. Then created a datagrid to this table (just by dragging the table name from the 'Data Sources' explorer to the form. When I run the … Software Development vb.net visual-studio | |
hi guys! i need help ! what's wrong of this code?? this program will input five names and will output the five names i inputed. but when i run this program and i inputed a five names. It couldn't give me the exact answer.. the output should be this: please … Software Development c++ | |
In a queue, where elements in integers are added, how do i do this: Inside the queue: 1 2 3 5 6 8 when I want to add a number, say 4, the output should be like: 1 2 3 [B]4[/B] 5 6 8 in which it inserts in between … | |
Is it possible to declare something like [code=C++] string blah[51] [/code] The way I would assume this would function is that each elements of the blah array would be a string, or is this not possible? Thanks Edit: just tried this in dev c++, and it didn't give me any … Software Development c++ | |
My goal is to have a vector fileList of type ofstream that I could later loop through to write the same information to each of them (copying at the end is not an option). The list of files comes from argv (processed by getopt). I understand that I need to … Software Development c++ | |
In excel, what I am trying to do is list the number of occurrences of column B, based on the number from column A. Here is sample data: [B] A..........B[/B] 3..........40 5..........56 2..........23 .......... .......... .......... .......... Example output to column C would be: [B]C[/B] 40, 40, 40 56, 56, … Software Development visual-basic | |
Hi, I was wondering how you would intercept data on a given port without interrupting it in WINSOCK. Like if computer A sent computer B "hi" on port 1337 and it was received on a server program. How could I listen for that data on computer B, but still let … Software Development c++ | |
Hi, I'm trying to program Tetris. The thing is, I can't seem to get the Keylistener to work in the JApplet, and I have no idea why :( Here's my code: [CODE=java] import java.util.Random; import java.awt.event.*; import java.awt.*; import javax.swing.*; /** * Class Tetris - write a description of the … Software Development java java-swing | |
Hi, I'm working on an algorithm that solves a maze from the inside, and seeks out 1 of the 4 exits on the sides, and after getting 1, it goes to the next until it has them all. The maze is always 22x22, and you only have 400 steps. I … | |
im using windows xp, and ive installed and unistalled dev C++ several times and i can not get it to work (compile and run) for any program even "hello world". even the dev c++ examples show a [linker error]. the code exactly is: [Linker error] undefined reference to `__cpu_features_init' ld … Software Development c++ | |
hello i just to know how to define an array... when using a variable... for example... [code=c++ ] cin >> numb; int an_array[numb] [/code] when i try it...it tells me cannot allocate an array of constant size 0 and unknown size ... so could you please tell me how do … Software Development c++ | |
I have the following repeating block of code in a website [CODE=html]<a href="LINK">TITLE</a><br>MANUFACTURER -- YEAR<br>PLATFORM<br>[/CODE] I need a regular expression to parse out the relevant bits in caps Ive been trying txt2re.com and expresso... But nothing generated there seems to do a decent job. I guess I need something that … Software Development regex | |
what is the difference between the following two approaches: [CODE]#include <iostream> using namespace std; int main(int argc, char* argv[]) { cout << "argc = " << argc << endl; for(int i = 0; i < argc; i++) cout << "argv[" << i << "] = " << argv[i] << endl; … Software Development c++ | |
![]() | how can you put spacing between objects? i mean, how can you place an object,e.g. a button, to the next line inside a pane? i tried setting the size (PaneSample.setSize(8,9)) of the pane and use flowlayout, but it wont work. can i get any suggestions from anyone? thanks! :) Software Development java |
Hey, I'm trying to compile some sample projects from the Xerces Library, but when I try to compile the code it give me this error: LNK1104: cannot open file 'xerces-c_2D.lib' What can i do to get rid of this problem? Software Development c++ | |
I have an application I originally wrote in VB2005. It ran fine on Win/XP and Vista 32bit. It would not run on Vista x64 nor would it provide an error message other than "A problem caused the program to stop working correctly.....". I dumped VB2005, got VB2008 Express and converted … Software Development vb.net | |
Hi! I am not that good in java and as a homework we had to write to classes: a partial abstract class Koerper and it's subclass Kugel but when I try to compile them the compiler always tells me this: [quote]Kugel.java:9: Kugel is not abstract and does not override abstract … Software Development java |
The End.