132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for itsbrad212

Hi everyone, I've been banging my head against the wall with this for a while. How can I read from a file if it begins with a certain string of text? Example: ...other lines... [U][I]depends=('curl' 'zsh')[/I][/U] ...other lines... I want to read the line in that file that starts with …

Software Development c
Member Avatar for itsbrad212
0
150
Member Avatar for kisei

HELP Solve this problem in vb.net using console app.!!!! 1) Write a program that accept a number and output its equivalent in words. sample: enter a number: 100 output: One hundred 2) Write a program that accepts an ordinary number and outputs its equivalent In roman numerals. sample: ordinary numbers: …

Software Development vb.net
Member Avatar for kisei
0
230
Member Avatar for darkmeyi0319

i have a question,it's about header files, the header files i always use is stdio.h and conio.h.... how can i use other header files like iostream, c time, etc.. whenever i use them and compile the source code, bad header files always exists,. Can you help me? Thanks a lot

Software Development c++
Member Avatar for darkmeyi0319
0
145
Member Avatar for uu666

can anybody tell me what is this segment register, which is its purpose and how does it work ? thanx in advance!

Software Development assembly
Member Avatar for L094129
0
177
Member Avatar for keanoppy

this is my code snippets to capture data from a textfile [CODE] try{ // to store the stopwords File file8 = new File("stoplist3.txt"); FileInputStream stopStream = new FileInputStream (file8); InputStreamReader reader8 = new InputStreamReader(stopStream); StreamTokenizer stopToken = new StreamTokenizer(reader8); List stopWordList = new ArrayList(); //stopwords up to here[/CODE] i don't …

Software Development java
Member Avatar for keanoppy
0
121
Member Avatar for gabz16

Hi programmers I need this code to be completed with the sjf(shortest job first) to be preemptive, it means with arrival times with each process.. Here is my code so far: CpuScheduling1.java Interface: Menu [1]First- Come First-Served [2]Shortest Job First [3]Priority Enter Choice: Note: I need to have the sjf …

Software Development java java-swing
Member Avatar for gabz16
0
399
Member Avatar for XtremeCold

Hi all, I am developing the Test Engine for an aviation application. The application has a file a.c that is calling an external function CREATE_SAMPLING_PORT(). My Test Engine has a file b.c that is calling CREATE_SAMPLING_PORT() as well. Each file is in different folder and has its own makefile. This …

Software Development c
Member Avatar for XtremeCold
0
233
Member Avatar for lewashby

[CODE]background_image_filename = "sushiplate.jpg" sprite_image_filename = 'fugu.png' import pygame from pygame.locals import * from sys import exit pygame.init() screen = pygame.display.set_mode((640, 480), 0, 32) background = pygame.image.load(background_image_filename).convert() sprite = pygame.image.load(sprite_image_filename) # The x coordinate of our sprite x = 0. while True: for event in pygame.event.get(): if event.type == QUIT: exit() …

Software Development python
Member Avatar for lewashby
0
837
Member Avatar for Krstevski

Hello friends, I want to found some algorithms for text processing. I have a lots of entries in the database and now I want to split by category (news, history, sport, business etc...) but I don't know none algorithm(s) for text processing. So, my question is, what is the most …

Software Development algorithm python
Member Avatar for Krstevski
0
114
Member Avatar for tennis

[CODE]Class date{ protected: int year_; int month_; int day_; public: date(); date(const int& d, const int& m, const int& y); date operator++(); //prefix operator date operator++(int); //postfix operator date operator--(); //prefix operator date operator--(int); //postfix operator }; date date::operator++(int){ //postfix operator return current value date d=*this; *this=next_date(d); return d; } …

Software Development c++
Member Avatar for webweb2
0
78
Member Avatar for Bigbrain99

How to label the first input of user as 1 ,second input 2, third input 3..etc by using ofstream append? Everytime when I used terminal to run it e.g. ./addcontact.cpp name1 ./addcontact.cpp name2 so that inside dat file it will has number of sequence in front of new name? e.g. …

Software Development c++ ios
Member Avatar for Bigbrain99
0
109
Member Avatar for revsin

I'm a noob, there got that outta the way. Wrote this to serve as a very basic inventory control for our store's iPad inventory. Lets junior employees count our inventory, and then appends the count in a text file. 99% there for what I want, but having trouble getting it …

Software Development file-system ipad python
Member Avatar for revsin
0
104
Member Avatar for Kingcoder210

I got a serious problem. Though I have made my program newly it shows error. I have used 1280,1024 animation only for first form then used 1280,1024 image for every form. Today I was checking then it was showing me error message for 19th & 20th form. If I use …

Software Development vb.net
Member Avatar for JRitchie777
0
124
Member Avatar for nv136

Hello, everyone. I have a small program, and i want that program to show how much RAM the whole system is using, and i want it to show how much R.A.M my program is using, any ideas on how to do that? is it hard?

Member Avatar for nv136
0
143
Member Avatar for techick

Hi...next semester I will be taking advanced programming in C++. I would like to know any good up-to-date books that I can buy and read ahead to get a head start so I can be prepared for the class

Software Development c c# c++
Member Avatar for khusro.iqbal
0
112
Member Avatar for daggerdvm

can you help me fix this code to make it better and more acceptable as per coding standards and such. im trying to get a good grasp of classes in c++ [code=c++] #include <iostream> using namespace std; class Calculator { private: int number1; int number2 ; public: Calculator setCalcNumbers(int input1 …

Software Development c++
Member Avatar for embooglement
0
153
Member Avatar for kadvar

Hi, I have a huge file (over 60 GB) which has lines in the following consistent format. "entry1";;"entry2";;"entry3";;"entry4";;"entry5";;"entry6";;"entry7";;"entry8";;"entry9";;"entry10";;"entry11" The problem is that a Few lines in this file have a line break precisely after the 3rd entry like this: "entry1";;"entry2";;"entry3\n ";;"entry4";;"entry5";;"entry6";;"entry7";;"entry8";;"entry9";;"entry10";;"entry11" I need to delete that extra newline and concatenate …

Software Development python
Member Avatar for kadvar
0
139
Member Avatar for stevee1984

A win32 listview with the view style set to LV_VIEW_DETAILS will not draw onto a window with its exstyle WS_EX_COMPOSITED set? Why? Heres my code for changing my dialogbox to composite if anyone is interested: [CODE] case WM_INITDIALOG: { unsigned long styles = GetWindowLong(hwndDlg, GWL_EXSTYLE); SetWindowLong(hwndDlg, GWL_EXSTYLE, styles | WS_EX_COMPOSITED); …

Software Development c++ listview
Member Avatar for stevee1984
0
322
Member Avatar for glenak

Hi all, I want to write some cryptographic operations using RSA, but its provider, bouncy castle, does not come inbuilt in java, which is why when I put in this code: [CODE]Provider bcProv = new org.bouncycastle.jce.provider.BouncyCastleProvider();[/CODE] I went to the providers site and they said something about putting this line …

Software Development java xml
Member Avatar for glenak
0
111
Member Avatar for michdd

I'm getting this error: [CODE]error: no matching function for call to 'cp::cpImageButton::SetMouseClickCallback(TitleScreen* const, void (TitleScreen::*)())'| note: candidates are: void cp::cpImageButton::SetMouseClickCallback(DisplayObjectContainer*, void (DisplayObjectContainer::*)())|[/CODE] However, TitleScreen inherits from DisplayObjectContainer, so I'm unsure why this isn't working. I haven't really worked with inheritance in C++ much, so a push in the right direction …

Software Development c++
Member Avatar for mike_2000_17
0
151
Member Avatar for ceal21c

Good Morning Guys, I have scoured the net for help with this problem of temporarily disabling mouse clicks on a VB Net form and have not been able to find a solution that works. I'd like to prevent users form clicking on a form when i'm doing some background processing. …

Software Development vb.net
Member Avatar for PsychoCoder
0
3K
Member Avatar for ftl25

Hi. I am currently building a small DLL (~20 functions so far) project to sit between a larger DLL and a VB project. I am now at a stage where I want some advice before proceeding (I can fairly easily make changes at this stage, but if I continue it …

Software Development c++
Member Avatar for mike_2000_17
0
122
Member Avatar for samsons17

Hi guys.... It has been a long time since i left this forum.. Now i'm actually back studying c++ and here is the little problems that i got with the 2D array question. I need to create this pattern using the 2D array: 1 0 1 0 1 1 0 …

Software Development c++
Member Avatar for Fbody
0
132
Member Avatar for daviddoria

I am trying to remove the need to #include stl elements in my header (a requirement for a project I work on). I wrote a "wrapper" for std::vector called "MyVector". I declare a pointer to a MyVector as a member of MyClass. Then when I try to use this in …

Software Development c++
Member Avatar for daviddoria
0
263
Member Avatar for dflatt

i'm trying to use string stream to get data from an input file. the program works until it get's to adding the elements to the array. i'm still not completely sure how to make use of stringstream yet or if i'm using it right. [CODE] ifstream ipf; ipf.open(test.txt); char c; …

Software Development c++ file-stream ios
Member Avatar for dflatt
0
147
Member Avatar for Dremerend

Hi, I am trying to write a somewhat basic program to read and write to a .cfg file(text file). Inside the .cfg file are a bunch of lines like so: server 127.0.0.1 servername Test server_no 1 server_group 1 etc, etc. The first word in the line being the name and …

Software Development file-system
Member Avatar for PsychoCoder
0
138
Member Avatar for ciali

2. A student studying Information Technology at Polytechnic of Namibia is examined by coursework and written examination. Both components of assessment carry a maximum of 50 marks. The following rules are used by examiners in order to pass or fail students. a. A student must score a total of 40% …

Software Development c
Member Avatar for Adak
0
132
Member Avatar for belometer

Hello there, I'm in the process of learning C# and windows forms. What I'm trying to do is adapt some scripts I have already made using PHP and MySQL to work in a windows environment and GUI. I previously wrote it using PHP because I was already familiar with the …

Software Development c# mysql php
Member Avatar for belometer
0
179
Member Avatar for andrewjrmill

Hi everyone i need some help im trying to compile a visual c++ program but theres a make file how do i us this to compile my program to exe im using windows xp thanks for your help

Software Development c++
Member Avatar for helioptra
0
118
Member Avatar for indigo.8

Hey, I have an array of ints that are read from a file then stored in an unsigned char array. The array is declared in a static link. The pointer is then passed to main. Main then calls a DLL which will process the information that is stored in the …

Software Development c++ ios
Member Avatar for indigo.8
0
5K
Member Avatar for MaiHunDown

Hi I have done C# but that is not enough Please tell me what should I do for more.... Thanks

Software Development c c# c++
Member Avatar for euroazn
0
87
Member Avatar for Auraomega

Finished writing this a little while ago but unfortunately the generated MD5 doesn't match other application's hashes. I have basically used [URL="http://en.wikipedia.org/wiki/Md5"]Wikipedia[/URL] for reference. I have a feeling my error is introduced in the padding stage but I can't be certain, hoping a fresh set of eyes could point out …

Software Development c++
Member Avatar for Kieran Y5
0
266
Member Avatar for glenak

Hi all, Ok, so I know how to write a simple client/server app where the send a message from the client and the message displays on the server's textarea, and I send a message from a server and it displays on the client's textarea. To do this I normally use …

Software Development app-store client-server java
Member Avatar for glenak
0
149
Member Avatar for PsychoCoder

C# code snippet demonstrating how to set the status of a specified Windows service. Provide the name of the service and it's value (it's an integer value described in the comments)

Software Development c#
0
769
Member Avatar for PsychoCoder

This is a snippet that will get either all the child controls of a form (other other control) or controls of a specified type. This is for C# 4.0 as it utilizes an optional parameter.

Software Development c#
0
3K
Member Avatar for nocookies92

I'm trying to make a program that will toggle a boolean value and paint a red rectangle on the right side of a swing panel when you press the 'a' key. Unfortunately, I'm not having much luck, because when I hit 'a' nothing happens. My mistake is probably something obvious …

Software Development java java-swing
Member Avatar for nocookies92
0
169
Member Avatar for srikanth2321

Hi, I have a file in the project which is called as it is. [CODE] var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("WindowsFormsApplication2.ds.cdx"); var bytes = new byte[stream.Length]; var read = stream.Read(bytes, 0, (int) stream.Length); var molecule = MolImporter.importMol(bytes);[/CODE] How can I give the path of the file. I have given the path like …

Software Development assembly file-stream
Member Avatar for srikanth2321
0
60
Member Avatar for glenak

Ok, this is very, very strange, and annoying. I declared this variable in my IDE: [CODE]long me = 2323237777777;[/CODE] And I get a compilation error saying that the literal 2323237777777 of type int is out of range. I don't understand. Isn't long supposed to be able to handle this type …

Software Development ide java
Member Avatar for glenak
0
107
Member Avatar for countpuchi

Okay, First and foremost im new to the forum. Hi and Thx to anyone who helps :D Anyhow, i would like to ask you guys if it is possible to separate a String with tokens one by one. Then make them appear in the jTextField with only 1 word per …

Software Development java
Member Avatar for jon.kiparsky
0
198
Member Avatar for fire_

Hello. I have some problems. 1.With for cycle. This is my code: [CODE]#include <iostream> #include <fstream> int main () { int i; int i2; char sentence [200]; char repeat; ofstream file ("file.txt", ios::app); for (i=0; i<1;) { cout << "Enter sentence (max. 200 symbols)\n"; cin >> sentence; if (!file) { …

Software Development c++ ios programming-construct
Member Avatar for Kanoisa
0
167
Member Avatar for bettybarnes

im having a problem with my database this is my partial screenshot of the form: [URL="http://i43.photobucket.com/albums/e355/bettybarnes/untitled.jpg"]http://i43.photobucket.com/albums/e355/bettybarnes/untitled.jpg[/URL] i want to have a form with the list of employee's id & names on the left side, and when i click it, it will display on the Personnel/employee tab? I don't have a …

Software Development vb.net
Member Avatar for Alexpap
0
127
Member Avatar for Jaydenn

[CODE] using (var sr = new StreamReader(Misc.tempFile)) { using (var sw = new StreamWriter(Misc.path + "test.dat")) { while ((line = sr.ReadLine()) != null) { for (int i = 0; i < detailViewer.SelectedIndices.Count; i++) lineToDelete[i] = Encryption.encrypt(detailViewer.SelectedItems[i].SubItems[0].Text) + "," + Encryption.encrypt(detailViewer.SelectedItems[i].SubItems[1].Text) + "," + Encryption.encrypt(detailViewer.SelectedItems[i].SubItems[2].Text); if (line != lineToDelete[detailViewer.SelectedIndices.Count - 1] …

Software Development encryption
Member Avatar for Jaydenn
0
222
Member Avatar for snigger

I wrote this round robin code and I want to calculate Response Time and Throughput [code] #include <stdio.h> #include <stdlib.h> // Data Structures typedef struct process{ char jobName; int arrivalTime; int execTime; struct process *next; } P; typedef struct result{ char Name; struct result *next; } result; // End of …

Software Development c
Member Avatar for Adak
0
2K
Member Avatar for Monster Killer

Hello. I am developing an application and i needed for find if a certain IP:Port is online or not and keep updating it. At the moment i have it pinging the IP:Port every time a timer ticks, this works fine but every time it ticks, the application window freezes for …

Software Development dns vb.net
Member Avatar for wb-dieingfriend
0
156
Member Avatar for valter

I have written a regex that works well except that it always puts the last word on a line of it's own. Can anyone see where I have gone wrong, this is my first attempt at regex. The text is of variable length. Basically my regex is trying to 1. …

Software Development regex
Member Avatar for Geekitygeek
0
103
Member Avatar for herberwz

My button is not gaving out any action when clicked: (libraryBtn): [CODE]package LibraryDatabase; import static javax.swing.JOptionPane.*; import java.awt.*; import javax.swing.*; import java.awt.event.*; public class PostLibraryDatabase extends JFrame implements ActionListener { // Text Fields XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX JTextField firstName, surName, id, serialNumber, category, dateToday, coverTitle, isbnNumber, authoursName, coAuthoursName, pubDate, loanDate, returnedDate, email, details; …

Software Development java java-swing
Member Avatar for NormR1
0
117
Member Avatar for HumanBeing86

Anyone know where is my M+U result go?? [CODE]#include <iostream> using namespace std; template<class P> P add(P a, P b){ P result; result = a + b; return result; } int main() { int a1 = 5, a2 = 3; double b1 = 1.2, b2 = 2.3; char c1 = …

Software Development c++ multimedia
Member Avatar for Fbody
0
200
Member Avatar for Jaydenn

Hello, I'm having problems removing an array of lines from a text file. Heres my code: Ugh, I apologize. I can't get the conventions to correctly show on this post, I'm really sorry. [code] using (var sr = new StreamReader(Misc.tempFile)) { using (var sw = new StreamWriter(Misc.path + "test.dat")) { …

Software Development encryption listview
Member Avatar for Geekitygeek
0
140
Member Avatar for NH1

What if the number i want to round is a decimal.? [code=c] /// <summary> /// Rounds a number to the closest multiple of another number. /// </summary> /// <example>83 rounded to closest 25 would give a value of 75 (83 is closer to 75 than 100)</example> /// <param name="num">The number …

Software Development mathematics
Member Avatar for jbisono
0
192
Member Avatar for Nivass

Hi, I have painted the image on the panel and drawn rectangle. now i like to move the rectangle and i succeed on that. My problem is when i use panel.invalidate in paint or in mouse move, panle get refeshed every time (all the things getting blink every time when …

Software Development
Member Avatar for Geekitygeek
0
112

The End.