43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for drogba123

Hi guys, i am trying to implement elevator simulation but stuck in some ways. 1st. i would like to set the background of my elevator class area into yellow but when i tried to do so by typing app.setBackground(COLOR.YELLOW) under class Elevator, i unable to change it. 2nd. i tried …

Software Development gui java java-swing
Member Avatar for drogba123
0
903
Member Avatar for badboy11

Hi All, I am coming from C++ world and working on some C# code. Currently working on a class with an ArrayList data member and would like to control which methods/behaviours get exposed to the client of this class. One of the functions in this class takes an index as …

Software Development c c# c++
Member Avatar for badboy11
0
172
Member Avatar for mainstreetmark

I'm doing my first C project in, maybe, 15 years, and have gotten stuck. I'm trying to link a 3rd party library into my project. I've installed the headers in ./include/ft and the libs in ./lib/ft Here's my compiler command and associated output: [icode] [root@wayne tele]# g++ -g lib/ft/libmbusmaster.a -lm …

Software Development c
Member Avatar for mainstreetmark
0
305
Member Avatar for Sunshineserene

Hi, I have a problem with my instance. I need to do a file read to extract all the numbers in the text file. However, when reading the file, I used String, and hence the file is read as a String. Later on I need to equate the output of …

Software Development java
Member Avatar for vasu d
0
428
Member Avatar for jalpesh_007

Please send me information/Source code on my e-mail ID that how can we implement BFS algo. in Java. Please tell me as soon as possible.

Software Development java
Member Avatar for JamesCherrill
-4
117
Member Avatar for bettersaid

someone knows how to launch an app in mac?? [CODE] import os class LaunchApp: def launch(self): os.startfile("/Applications/QuickTime Player.app") s = LaunchApp() s.launch()[/CODE] this code works on windows and [CODE]os.system('gnome-open ' + /path)[/CODE] on linux but in mac, it returns this error "AttributeError: 'module' object has no attribute 'startfile'"

Software Development operating-system python
Member Avatar for nathan099
0
1K
Member Avatar for ftl25

Hi, How do I check if a member of a struct is null? I've tried: [CODE]if(ErrorInfo->TestName != NULL)[/CODE] The above method returns true even when [B]ErrorInfo->TestName[/B] contains nothing (debug shows it as 0xccccccc, ""). [CODE](!(strcspn(ErrorInfo->TestName, "") == 0))[/CODE] The above method throws an access violation. I've tried other ways too …

Software Development c++ data-structure
Member Avatar for ftl25
0
10K
Member Avatar for swathys

Hi, Can anyone help on my code. i'm not sure whether i'm code in right way or not. I would like to do 1) read total value from a particular table in 2 database (MyAccount & DealerAccount)from the most recent transaction 2) read grandtotal from another database from the most …

Software Development vb.net
Member Avatar for swathys
0
93
Member Avatar for fourty

Hi guys I need a code that outputs the save as Dialog box. Just as simmple as that. Thanks.

Software Development visual-basic
Member Avatar for AndreRet
0
136
Member Avatar for badllama

Okay, I’ve got a noob question. It’s been awhile since I coded so I thought I’d start off at the beginning and create a template list and tree. Back in the old days I left the nodes open, but I wanted to keep the data private this time. My first …

Software Development c++ queue visual-studio
Member Avatar for Valaraukar
0
229
Member Avatar for tongdl04

Hello, I am a newbie in C++ programming. I try to write a C++ program to first read and split a hugh text file (that containing multiple small files inside it) into multiple small text files, then I need to write the first line of each small text file into …

Software Development c++ ios
Member Avatar for tongdl04
0
560
Member Avatar for acrocephalus

Hello! I have a table with some rows and cells (code at the end), and created a function which searches for text inside the cells and returns the row number where the text is (to simplify the example, only English Name is working). Then, it should set the grid cursor …

Software Development python
Member Avatar for acrocephalus
0
161
Member Avatar for bookmark

[CODE]// #include <iostream> using namespace std; #include <cmath> #include <math.h> int main() { float a, b, c, t, s, area; cout << "Enter the lengths of your triangle's sides: "; cin >> a >> b >> c; if(a>b) {t=a; a=b; b=t;}; if(b>c) {t=b; b=c; c=t;}; if(a>b) {t=a; a=b; b=t;}; if((c*c) …

Software Development c c# c++
Member Avatar for bookmark
0
222
Member Avatar for SeanC

Hi all, I've got a certain instance in my program where an integer variable, let's call it 'x', is initialised in one part of a class, however the value is not present when the integer is called in another class. To explain further, I've got 2 classes - 'class1' and …

Software Development java
Member Avatar for masijade
0
469
Member Avatar for Sunshineserene

Hi, I need to do a file read and extract all the numbers in the text file to be used in my java program. However, I'm having some problem with the try and catch statement. Must the try and catch statement be in the main loop only? Can't I used …

Software Development java
Member Avatar for Sunshineserene
0
181
Member Avatar for asyk

Hi there, I am trying to find the max and min value in a an array of size 100, but the input is stopped when there is a 0 entered, and it too gets added to the array. The code below works good, EXCEPT it's min value is always -2, …

Software Development c
Member Avatar for asyk
0
141
Member Avatar for scias23

I have a 18kb 1024 x768 jpeg image that is set as background image of my form. The problem is the form now lags like crazy. How can I eliminate the lag?

Software Development html-css image vb.net
Member Avatar for the_carpenter
0
113
Member Avatar for ceatkin2

I am trying to define a 2D array of 1000 by 1000 ints and then test which transversal method is faster (row major or column major). I have this written [CODE] #include <stdio.h> #include <time.h> int main() { clock_t start, end; double elapsed; start=clock(); int array[1000][1000]; int row, col; for(row=0; …

Software Development c
Member Avatar for ceatkin2
0
171
Member Avatar for ItecKid

*EDIT-I know strtok doesn't actually 'return' a segfault-I realize after submitting topic that is poor wording. Hello, I am having a problem with the C function strtok, as follows: [code=c] void function_name (char * cmd) /* Gathered from another function using readline. Assume 'ls -l' in this example */ { …

Software Development c
Member Avatar for abhimanipal
0
804
Member Avatar for bspace

Hi, I'm trying to learn OOP, and I've run into a problem. I am supposed to have the user create a user name, and then I'm supposed to import a list of movies for the user to rate. I created a class called Movie. The function within is supposed to …

Software Development oop python
Member Avatar for bspace
0
257
Member Avatar for sss33

How to convert numbers from a file into integers the numbers in the file are alerady split but they are strings. Doesnt anyone know how to convert them to integers so they can be manipulated as numbers.

Software Development python
Member Avatar for griswolf
0
102
Member Avatar for keekee769

I need help...This is the class i am supposed to use... [CODE]#ifndef_MINESWEEPER_H #define_MINESWEEPER_H #include <iostream> #include <ctime> #include <cstdlib> using namespace std; const int SIZE = 3; class minesweeper { public: minesweeper(); minesweeper(int mines); void resetGame(); int flagCell(int x, int y); void unflagCell(int x, int y); int uncoverCell(int x, int …

Software Development c++
Member Avatar for keekee769
0
106
Member Avatar for jcfans

i wan create a datatable complex like tis 1!any1 can teach me how to do it? The datatable consist 5 datacolumn(col1,col2,col3,col4 and col5) the data of row of col1,col3 and col5 is fix("A","Book","100") and tis same data will insert into 30 row (when the ds.Tables(0) got 30 row) the data …

Software Development vb.net
Member Avatar for jcfans
0
103
Member Avatar for jogieglenmait

I have a problem with my console program. I have a text file named "myRecord.txt" with the following contents: 101,Carlito Caballero,500.00 102,Tina Gamboa,560.34 103,Angel Caballero,750.55 104,Kyla Shane,850.32 105,Jogie Glen Mait,1000.00 If I run the program, the console should prompt the user to enter the id number (which is the set …

Software Development c++
Member Avatar for jogieglenmait
0
375
Member Avatar for Ghostenshell

Really stuck on this and its supposed to be easy. I'm supposed to input 2 positive nonzero integers into x and y. Then return the value of x times y. The book has an example of 7 * 4 = 4 + 4 + 4 + 4 + 4 + …

Software Development python
Member Avatar for TrustyTony
0
143
Member Avatar for swathys

hi, I have problem with my application. when i run the application it gives an error "there is no source code available for the current location". It doesnt read any of the msgbox i put in all forms.I dont know what goes wrong with my application. Please help. Its very …

Software Development vb.net
Member Avatar for lolafuertes
0
158
Member Avatar for samuel17

Hi all, Having another problem with a program. I thought i had this one pretty good, i was confident about it, but no luck. The problem was with initializing a variable, i try to add in to output what the variable is and it says it needs to might not …

Software Development java java-swing
Member Avatar for samuel17
0
214
Member Avatar for RaigaX9

Hi, I'm having a small problem with the program that I'm doing. Here is the instructions for it: Write a program named ConvertDate that converts a date entered by the user into another form. The user’s input will have the form month day, year The month will be one of …

Software Development java
Member Avatar for RaigaX9
0
686
Member Avatar for Wootens

Hey guys, I've constructed this program and I have this error that I don't understand. What I'm trying to do is have a user type in a positive number and then it counts up to that number. If the number is divisible by 3 or by 5, it prints Beep …

Software Development java
Member Avatar for Wootens
0
176
Member Avatar for ziggystarman

Hello I'm looking to extract jpeg image data from a mjpeg stream, but I'm not sure how to do this in c++ . The code snippet below does the job of connecting to the remote ip camera server & receives the mjpeg stream via tempBuffer variable. [CODE] // Loop and …

Software Development c++ file-stream
Member Avatar for ziggystarman
0
2K
Member Avatar for suncica2222

can I use fopen,and fwrite with ShellExecute? to take file in buffer,drop it in directory and run it with ShellExecute I did this way but I just get cmd window and file is corupted do I have to use some API to take file in buffer?

Software Development api c++
Member Avatar for suncica2222
0
166
Member Avatar for reemhatim

I've taken a course in c# and started practicing by getting questions from books or sites to be good at programming but I think I'm not getting to the right track and I want to be professional in c# language so what is your advice to me ?? thank you …

Software Development
Member Avatar for reemhatim
0
107
Member Avatar for Ultralisk

Is there a way to sort an empty list of strings as you add more values to the list? I cannot find a decent example of this anywhere and struggling with this. The insertion sort seemed like the logical plan, but I cannot for the life of me find anything …

Software Development python
Member Avatar for vegaseat
0
2K
Member Avatar for lewashby

[CODE]import wx # create window app = wx.App() win = wx.Frame(None, title = "Simple Editor", size = (410, 335)) win.Show() # create buttons loadButton = wx.Button(win, label = 'Open', pos = (225, 5), size = (80, 25)) saveButton = wx.Button(win, label = 'Save', pos = (315, 5), size = (80, …

Software Development python
Member Avatar for vegaseat
0
113
Member Avatar for Steve_Jones

I want to create a left mouse click. All i can find anywhere is having to do if the user clicks, i want to create a left mouse click automatically.

Software Development
Member Avatar for Steve_Jones
0
309
Member Avatar for benhowdle89

Hi i've been set this assignment to design a Craps game for Java, i know this has been done lots before but i seem to be going round and round with this code....very frustrating! This is the code i've written so far: [CODE] public class CrapsGame { public static void …

Software Development java
Member Avatar for benhowdle89
0
149
Member Avatar for lukename

Hello guys. How can i get my file path? I konw my program's name but i don't know where it will be put. How can i get file path during program's execution? Thank you

Software Development c++
Member Avatar for William Hemsworth
0
165
Member Avatar for charqus

Hello guys. Let's say i have a unidimensional array: string[] names = {"John","Merlin","XMan","Kelvin",...,"Flash"}; How can i see how much elements i have ? I tryed with sizeof(names) but it doesn't works ... Next Question: I have a RichTextBox, and i select a text ... i change it's color, but when …

Software Development flash
Member Avatar for charqus
0
143
Member Avatar for swathys

hi, I have problem with my application. when i run the application it gives an error [COLOR="Red"]"there is no source code available for the current location"[/COLOR]. Even i try to debug using f8 and msgbox in all forms, It doesn go thru it.I dont know what goes wrong with my …

Software Development vb.net
Member Avatar for swathys
0
70
Member Avatar for jcfans

i got a data like tis 1([COLOR="red"]0-AGF-MYR-100101[/COLOR]), i wan split to 4 part([COLOR="Red"]0 , AGF, MYR ,100101[/COLOR]) and after tis i nid to add 4 new columns to a datatable to display the value! how nid i do??? [CODE] Dim writer As StreamWriter = File.CreateText("D:\ IMS.csv") For i As Integer …

Software Development vb.net
Member Avatar for marketingmaniac
0
2K
Member Avatar for Jake2025

Can somebody help me, i want to save the output of this program in a .csv file but i don't know how. please i need help. import java.io.*; public class TestEmployee { public static void main(String args[]) throws IOException { Employee staff[] = new Employee[args.length]; // populating the array of …

Software Development java
Member Avatar for Jake2025
0
119
Member Avatar for ccube921

Line 34 and 35 won't execute unless I insert them into the for loop. [CODE]#include <iostream> using namespace std; int main() { cout<<"Please enter an integer.\n"; int intege; int integ; for ( int inte = 1; inte = 1; ) { cin>> intege; cin.ignore(); cout<<"Please enter it again."; cin>> integ; …

Software Development c++
Member Avatar for ccube921
0
290
Member Avatar for ccube921

When I press enter after the execution of the code, it doesn't terminate and tell me the process time etc. it just skips a line. [CODE]#include <iostream> using namespace std; int main() { cout<<"Please enter an integer.\n"; int intege; int integ; for ( int inte = 1; inte = 1; …

Software Development c++
Member Avatar for ccube921
0
209
Member Avatar for AntonyLini

Hello All, I am here with the same Query but with a different look I want to apply the culture change to my program. I created a class library for culture change. and applied it . It is only working with the form name, i did it with two different …

Software Development vb.net
Member Avatar for AntonyLini
0
381
Member Avatar for KrazyKitsune

How do you use a variable originally from a def function?

Software Development python
Member Avatar for Enders_Game
0
149
Member Avatar for PDB1982

How can I code to restrict the users input to 5 numbers and no more or less....I can't think of a good way to do it. [code] import java.io.*; public class Palindrome { public static void main(String [] args){ try{ BufferedReader object = new BufferedReader( new InputStreamReader(System.in)); System.out.println("Enter number"); int …

Software Development java
Member Avatar for tong1
0
110
Member Avatar for kchyn

Hey, I have a generator but it works dependently on time, so it makes new values only every second. Is there a way to make it work faster? I want to be able to generate new numbers every millisecond if possible. [code=C++] srand((unsigned)time(0)); int a; int b; int c; int …

Software Development c++
Member Avatar for Valaraukar
0
249
Member Avatar for KrazyKitsune

I'd like a code in which a raw_input function will end and move to a print function after 35 seconds. So something like: [code=syntax]var = raw_input() # put time limit of 35 secs here print "Time's up!" # prints this only if time runs out in the raw_input[/code]

Software Development python
Member Avatar for wikirifi
0
4K
Member Avatar for frank754

I'm trying to quickly learn C# in Microsoft Visual Studio 2008, as I need to show some proficiency for my new job. Previously I have worked mostly with Linux (PHP/MySQL). I not having any trouble with C# itself (variables, loops, etc.), but what I do need is to learn as …

Software Development visual-studio
Member Avatar for frank754
0
145
Member Avatar for Toikkala

Hey, i need to make app that should take 10 chars from list. I tried it with range command but it's not working. [CODE] list = 'abcdefghijklmnopqrstuvxyzo' for list in range(10): print list [/CODE] And this code just prints numbers 0 to 10. So, is there some other command that …

Software Development programming-construct python
Member Avatar for TrustyTony
0
230

The End.