43,549 Solved Topics
Remove Filter ![]() | |
If there's anyone who knows a thing or two about this, your help would be much appreciated. This is a code I'm working on: [CODE] try { //ask user for short password System.out.print("Enter a password: "); //read in a character at a time, putting them into the buffer while((buf[bufPos++] = … Software Development encryption java | |
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 | |
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 | |
[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 … | |
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 | |
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 … | |
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 … | |
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 | |
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 | |
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 | |
[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 | |
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 | |
Hey guys, I'm getting this error: [quote]1>GoblinRecruit.obj : error LNK2019: unresolved external symbol "public: void __thiscall Mob::set_data(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,int,int,int,int,int,int,int,int,int)" (?set_data@Mob@@QAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HHHHHHHHH@Z) referenced in function "public: __thiscall GoblinRecruit::GoblinRecruit(void)" (??0GoblinRecruit@@QAE@XZ) [/quote] When I try to run this section of code: [code=c++] #include "Standard Libs.h" #include "Ability.h" class Mob { private: string … Software Development c++ | |
Does anyone know how to "disable" the windows taskbar.. or at least "hide" it, using Win32? I've seen it done in another program.. but I was clueless as to how the person did it. I would like to be able to display one of my programs on the entire screen, … | |
Hi I want to capture the output into java varible of one of the command line statement. The command line statement is as below: [COLOR="Green"][B]..\_jvm\bin\java.exe -cp ..\DataLoader.jar com.salesforce.lexiloader.security.EncryptionUtil <option> <password>[/B][/COLOR] Infact this is the command line utility thru which I encrypte my password, if i do manually. [B]But I want … Software Development java | |
May I know how to split a word into individual characters (letters)? For example, AUGC into A U G C Software Development java | |
Hi Everyone! I have trouble in finding a way to hide or let certain amounts of items be unable to see in a listbox. Here is what I have done so far [CODE]Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged Select Case ComboBox1.Text Case "Snacks" ListBox1.Items.Insert(0, … Software Development vb.net | |
i recieving error on rs.open up to conn on private sub cmdlogin [CODE]Dim conn As ADODB.Connection Dim rs As ADODB.Recordset Dim sql As String Dim cmd As ADODB.Command Dim button As String Private Sub ConnectToDB() Set conn = New ADODB.Connection conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" _ & "Data Source=" & App.Path _ … Software Development open-source visual-basic | |
I want to create External UI using C# for MSI package. I found very little document after googling for long time. Please help! Software Development | |
I have a look up table as follows: [CODE] // A structure to hold all the commands and function pointers typedef struct { char functionName[256];// The function name is used to refer to the function pointer int (_stdcall *myfunction)(char *, char *); // This defines the function pointer } LOOKUP_TABLE; … Software Development c | |
I'm going through K.N. King's introductory [i]C Programming: A Modern Approach (2e)[/i] and every time I see the code in the book, I can't help but wonder what's the better way to write your code in the following situation. Should I use the curly brackets or not, and how much … Software Development c | |
OK. So I'm making a simple game that is a car that moves around the screen according to the arrow keys. i have made code to rotate the car inside the picturebox, but i don't know how to make the car move in the direction that it is facing after … Software Development vb.net | |
Hey guys ... I'm using VB6 and I need some help I have 3 forms the first form contains "listbox" and "add" button and "edit" button the second one contains a bunch of textboxes and "save" button the third one contains labels now when I click add button it goes … Software Development visual-basic | |
I have 2 arrays that are in a while loop each. I have declared the array ouside of the main, declaring it 'public static'. I want to use the values store in the array outside of the while loop, but I can't seem to do it. May I know how … Software Development java programming-construct | |
hi. could some one help me. I am trying to read the tokens into the array but the datatypes are incompatible. what should i do to cast it into the same thing. the numbers from my text file are actually floats. But i can make do with just the integers … Software Development java | |
Hi, Can anyone send the download link of j2ee server. thank you, With regards, Prem Software Development java | |
Hi everyone.. I've recently switched over from Visual Studio 6.0 to visual Studio 2010.. The problem is studio 2010 does not have an "execute .exe button," as version 6 does. Is there a way to manually place an execute .exe button inside of visual 2010? Software Development c++ visual-studio | |
Hey I've just started using C# and wanted to start employing DirectX as well however before I can start all the tutorials I go to say I have to add a reference to the library. Now I've installed and reinstalled the June 2010 DirectX SDK a few times but the … Software Development | |
[CODE]void addname(string name) { ofstream myfile(CONTACTS,ios::app ); myfile.open(CONTACTS); if (myfile.is_open()); { myfile<<i++<<name<<endl; myfile.close(); } }[/CODE] Initially the codes just kept on overwriting the existing file, but after that i was told to put ios::app. However, it is still now working....now even worse...ofstream is not even writing the file...hellp.. | |
well i didn't know how to name it, well my problem is that when i put center parent its centered from the form that was open obviously but when i put my program after the screen resolution like it cuts more then the half of the program and i open … Software Development vb.net | |
Hi, I have a constantly rotating image and i want to get the pixel at a specific point (where i click). The problem is that after the rotation the image won't update the bitmap with the new position, so the pixels will remain exactly the same whether the image is … Software Development image | |
When i tried to compile it, it gave me this error "no match for operator". Any idea how could this happen? This program will take user input and add it into dat file [CODE]#define CONTACTS "contacts.dat" #include <iostream> //enable the used of cin and cout #include <fstream> //enable writing file … Software Development c++ | |
I am trying to make this project and im very new to this but i really want to learn this can anyone check this code for me and tell me whats wrong with it. I have to get it to add 2 fractions display result then display result in decimal … Software Development c++ | |
I'm trying to create a method which checks if a certain text file is empty, and if so it deletes it. However, the program seems to freeze for one reason or another when executing this part. [CODE]try { BufferedReader in = new BufferedReader(new FileReader("File List.txt")); String str; while ((str = … Software Development file-system java | |
Hello. I am a n00b learning to code in Python. Right now, I am working on functions and parameters. To practice, I am making a simple Celsius-to-Farenheit converter. However,whenever I run the program it returns a NameError. I am confused in my n00bishness. Please reply. Here is my code: [CODE]>>> … Software Development python | |
currently I'm building a program which can take people contact and add it to a dat file. However, when I tried to run the program, i got this error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript [CODE] class Contact{ private: int phones; string email; string name; public: void … Software Development c++ |
The End.