132,726 Archived Topics
Remove Filter ![]() | |
Hi All, I am just learning Java and there is a concept that I cannot grasp. I am writing a simple exercise program that works with stacks. I have a sum method for two different types - Integer and Double. They both have the same logic, so it seems redundant … Software Development java | |
Hello all, I'm trying to make a simple text box with SDL, I have loosely based it off of [URL="http://lazyfoo.net/SDL_tutorials/lesson23/index.php"]The Lazy Foo Tutorial on sting input[/URL], but this code doesn't seem to work... [CODE]if(event.type==SDL_MOUSEBUTTONDOWN){ if(isIn(event.button.x,event.button.y)){ hasFocus=true; } else { hasFocus=false; } } if(event.type==SDL_KEYDOWN){ if(hasFocus){ if(event.key.keysym.sym!=SDLK_BACKSPACE){ str+=(char)(event.key.keysym.unicode); } else { if(str.length()!=0){ … Software Development c++ | |
I am designing a system which will broadcast a message to all the nodes in a cluster.And the receiving node should send a feed back to the broadcasting node.When i get a single feedback from any of the receiving node, the broadcasting node should stop receiving the feedback.With that feedback … Software Development c socket-programming | |
![]() | Hello all, This is my first post but i have lurked around the forums for a while (sans account) my problem is thusly: I have written a program to take information from a data file, copying values to a vector, allow the user to add/delete and print form this vector … Software Development c++ ![]() |
please i was wondering if anyone could help me with my code, i feel its kinda too long and a good program should be as brief as possible... please would be very grateful. appreciated, cheers.. [CODE=cplusplus]int _tmain(int argc, _TCHAR* argv[]) { string Username; string Password; int terminator = 0, terminate … Software Development c++ | |
Hi, all I am trying to write the function to get rid of my punctuations. My code: [CODE] //_word_list is the vector<string> type void TextUtil::isnotpuct() const { for(size_t i=0; i<_word_list.size(); i++) { size_t len = _word_list[i].length() + 1; for(size_t j=0; j< len;j++) { if(ispunct(_word_list[i][j])) { _word_list[i] = ""; } j++; … Software Development c++ | |
Write a program that reads in an array of type int. Provide facility to either read this array from keyboard or from a file, at the user’s option. The output for the file input option should be stored in a file while the output for the keyboard input option should … Software Development c++ | |
Hello, I am attempting to create a program that accomplishes the following: *I am to develop a heap, that is tree-based(not array) *The heap should be ascending *Include the method toss() -This method will randomly toss a node into the heap and will not maintain the proper heap conditions *Include … Software Development java | |
![]() | this relates to _nestors problem but im trying to expand it on my own i have this code: [code=python] logfile = open("logfile.txt", "r").readlines() KEYWORDS = ['test', 'text'] counterline = [] counter = 0 for line in logfile: for word in line.split(): counter+=1 if word in KEYWORDS: counterline.append(counter) print word print … Software Development python |
Is there any way to mix visual c++ with normal c++? like can i enable mixed code? i want to get rid of this error: 1>tab.h(32) : error C4368: cannot define 'p' as a member of managed 'Monitor4vc::tab': mixed types are not supported | |
Hi, I want my my input, just numberic allowed. if user key in alphabet, error message will show up. How can i do that?! Please help! Thanks Software Development vb.net | |
Aelphaeis here with another little problem. In the Code below I attempted to make a generic function which read a line up to a newline character and then returned the string. The program reads as follows [CODE] #include <stdlib.h> #include <stdio.h> #include <strings.h> int getstring(char *string,int max); int main(int argc,char … Software Development c | |
Hello, This is my first time using forum to ask around for some assistance. I will make it briefly. [code] void main() { char *StringPtr; //pointer of char char String[26]; //array of chars strcpy(String, "abcdefghijklmnopqrstuvxyz"); if((StringPtr = new char[26]) == NULL) cerr << "\n\a allocation failed" << endl; else cout … Software Development c++ | |
hi. I have a jlist on a frame. I want to add items dynamically in the list. So, I am using DefaultListModel..Here's my code: [CODE]public class AdminFrame extends javax.swing.JFrame { private Statement S; private ResultSet R; DefaultListModel model = new DefaultListModel(); JList Employee_list = new JList(model); /** Creates new form … Software Development java java-swing | |
i have a file path shown below i intend to display file only; C:\Users\densman\Documents\ImageUploader\[B][COLOR="red"]Chickens1.jpg[/COLOR][/B] is there a way to display [B][COLOR="red"]chickens1.jpg[/COLOR][/B instead of all the path?? Thanks Software Development vb.net | |
Dear friends I have a conversion from ascii to binary while when i use my input which is like this : 16078 16283 0.3708 16078 16837 0.4514 16078 17820 0.4038 16078 17906 0.3695 16283 16837 0.3905 16283 17820 0.4343 16283 17906 0.3262 16837 17820 0.5291 16837 17906 0.6245 17820 17906 … | |
Hello! I'm having the following problem: My application uses an SQL sever, and I entered the connectionstring in a .settings object. It warned me, that it's a security risk, etc. When I publsih my app, two files would be deployed, an .exe and a .config file, which contains all of … Software Development | |
I don't know where this question came from, but... Is there a way to start at one directory, say... C:\ . and I wanted to go into that folder, and printout a list of the folders/files in that directory, and then do the same for the rest of the folders … Software Development file-system java | |
Hi. I have two tables in mysql - [B]customer_master[/B] and [B]contact_master[/B]. customer_master has a primary key - "cust_id" ,which is a foreign key in contact_master and "cust_name" which is also a foreign key in contact_master. I have a [B]frame[/B] which will do [B]CRUD operations for contact_master[/B]. The frame has two … Software Development flash java java-swing | |
here is a workbook demo: [URL="http://www.datafilehost.com/download-553fafeb.html"]http://www.datafilehost.com/download-553fafeb.html[/URL] Ok. Let me explain. I have an Excel worksheet with a Source Cell and a Target Cell. Via GDI API functions, I draw a temporary gradient fill over the source cell which happens to be cell "D6". then, I make a transparent copy of … Software Development api visual-basic | |
hello im having problem trying to get this to do what i want it to do. after the program asks if the user has had any work up to date, i want it to ask for specification if the answer is yes, or go to a next question if no. … Software Development c++ | |
im trying to write a program to see if two lists are equal im really kinda lost at the moment, i havent gotten the compare function yet but i think that should be pretty easy, but im having some errors which u can see. [code=C] #include <stdio.h> #include <stdlib.h> typedef … Software Development c | |
I'm trying to compare two variables that is being inputed by the user but then it wont function [code] if (txt_pay.getItem() < txt_amount.getItem()) { jOptionPane1.showMessageDialog(this, "please enter the right amount"); } [/code] what could be wrong? the error says [quote] operator < cannot be applied to java.lang.string [/quote] another one … Software Development java | |
hi, i have just written a simple hello world java program in my linux server, installed jdk ... and tried to compile and run it and it gave me some errors. please details below: [root@localhost javaFiles]# cat HelloWorld.java [code] import java.util.*; import java.io.*; public class HelloWorld { public static void … Software Development java | |
I'm creating a program in Visual C++ and the program I'm creating needs to read a data in an Excel document. It was saved in .xls format. Can someone help me on how to read data in an Excel file. No need for writing or editing the excel document, just … Software Development c++ | |
I have a very simple one line function and i want to replace it with macro, but macro doesn't seem to work. Function: [CODE=C]int stack_empty(stack ** this_stack) { return *this_stack == NULL; }[/CODE] Macro i am trying to use: [CODE=C]#define stack_empty(x) (*x == NULL)[/CODE] Anybody knows what i am doing … Software Development c | |
Is there an event in the ComboBox for when an item added to its collection? Thanks in advance, Harold Clements Software Development | |
Hi, I have been exploring doing some GUI programming with the wxWidgets toolkit as i am used to that from programming wxPython in python. I am doing the tutorials from zetcode and i am very mystified. (i think i spelt that wrong). This is the url [url]http://zetcode.com/tutorials/wxwidgetstutorial/menustoolbars/[/url] Its the first … | |
Hi everyone, I have been working with Matlab but now I have to develop a couple of programs in Python. So I am new to Python. Could anyone tell me the python equivalent of [B]eval [/B]command of Matlab. Actually I have to open a set of say 100 files to … Software Development python | |
i'm trying to connect two computers over the internet. kinda a messeging service between my desktop at one house, and my laptop at my other. i want the desktop to connect to my laptop and then just send it a message. but i don't know how to get the laptops … Software Development visual-basic | |
I need help with my program. I have four errors with the ostream. It should be print my list of books. I know its something simple... I just can't figure it out! [code] #include <iostream> #include <string> using namespace std; //---------------------------------------------------------------------------- class Book { private: string title, author, genre, pubyear, … Software Development c++ data-science os-x | |
iv just done a cricket scoring system but the output is to a txt file - i want to put some of the details to a database , meaning remove the txt file and have a db instead. the programm is fully functional but needs a database - can any1 … Software Development visual-basic | |
Hi, I have written the following program but its not doing what's it supposed to do ! For some reason sometimes nothing or rubbish is being printed onto the screen. However, if I don't use function but instead do everything within main(), then its fine. What's the problem with the … Software Development c++ | |
Hi, all its me again! I got really stuck by the STL library and do not know how to correct that. Here is my class code: [CODE=C++] class A { public: A( const string& filename ) { ifstream file(filename.c_str()) ; string word; while( file >> word) { _word_list.push_back(word); } } … Software Development c++ | |
when we go for webservices ? can any one explain me with example plz.....i have searched in google...i want real time example Software Development | |
Hello, I need help to parser a doc xml. I need to get the value of @show, but only on the lines with @name="wlan.seq". And after, I need to know how many times the same value of @show was repeated in the doc xml (if it was repeated). How do … Software Development xml | |
Here is my assignment: Write a class named 'Video' that has two attributes, a title (type String) and rating (type int). Then write an application class named 'VideoStore' that first creates an array consisting of 5 video objects, then display the list three times; first unsorted, then sorted by title … Software Development java | |
Hi, I'd like to pass arguments with space inside to a bash script and further into an executable called inside the script. My bash script looks like: [code] #!/bin/bash ARG_OPTS="" while [[ -n "$1" ]]; ARG_OPTS="${ARG_OPTS} $1" shift done my_executable ${ARG_OPTS} [/code] one of the arguments to the executable is … Software Development shell-scripting | |
Okay so the deal is, our instructor wrote what the class is supposed to look like (will be included with the code) and also gave us the Input, Preconditions, Process, Output, and Postcondtions of each function that is supposed to be used. I'm having trouble with an insert, delete, and … Software Development c++ | |
Hello again! I've started a game project for fun, and I used the knowledge I gained a few days ago from a thread I posted. Now I've taken that tried to take that (taking a text Entry out of a GUI and using it outside the class) and apply it … | |
hi there! I have a file.txt looks like this: [QUOTE]Michael 001 Yeeka 002 Sam 003 Tom 004[/QUOTE] Michael is the member name, while 001 is the ID number. How can I write a coding to validate that whether user has type in the correct name and ID that is inside … Software Development java | |
Hi i am trying to display a filename from a folder. I have printed out the folder path via a label. Is there a way i can print out th file name Software Development vb.net | |
This is a project I'm working on for a class. I'm pretty new to CS and python...and I found that I am totally lost. I'm suppose to write a program to convert Roman numerals to arabic numbers. It is also suppose to handle invalid input. Here is what I have … Software Development python | |
Guys i am working on a desktop application idea, using the visual paradigm to draw uml diagrams then export them to an XMI file. the problem that i am facing is that i need a uml 2.0 meta model data structure to use with C#.net. i was wondering if any … Software Development c# data-structure | |
Does anyone know of a compiler that will let you utilize WPF in Linux? Software Development | |
Hi all I would like to popup an Outlook contact via a Click button. The "Popup action" works fine~ However, after the outlook contact comes up, the WinForm(Form1) seem stuck and hold .... I can't move, minimize and maximize the WinForm ????? Any body know what is the problem in … Software Development microsoft-office | |
Hi, I have a scenario wherein I need to give access of a system to the hosts of a subnet. For that I need to verify if the incoming request is from the IP which falls within the subnet. Is there some way to do that automatically using c# functionality. Software Development | |
Hey guys, I've got a multithreaded application done in C# but the label on one of my forms won't update! It doesn't do anything [code] public IndividualPCSpec(AllKnownDevicesFrm parent) { m_Parent = parent; InitializeComponent(); m_IPAddressLbl.Text = "HELLO"; } public void showInformation(ComputerHardware dto) { m_IPAddressLbl.Text = "HELLO WORLD"; this.Refresh(); this.m_IPAddressLbl.Refresh(); Application.DoEvents(); } … Software Development |
The End.