132,726 Archived Topics
Remove Filter ![]() | |
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 | |
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 | |
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++ | |
can anybody tell me what is this segment register, which is its purpose and how does it work ? thanx in advance! Software Development assembly | |
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 | |
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 | |
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 | |
[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 | |
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 … | |
[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++ | |
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. … | |
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 | |
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 | |
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? Software Development display microsoft-access motherboards-cpu-ram vb.net | |
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++ ![]() | |
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 | |
![]() | 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); … ![]() |
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 … | |
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++ | |
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 | |
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++ | |
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++ | |
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++ | |
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 | |
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 | |
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 | |
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 … | |
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++ | |
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 … | |
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++ | |
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 | |
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# | |
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# | |
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 | |
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 | |
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 … | |
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 | |
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 | |
[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 | |
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 | |
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 … | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 |
The End.