132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for KevinADC

A bare-bones code snippet to remove duplicate lines from a file. There are a number of ways to accomplish this task but this is a fast and dependable method using perls inplace editor and a simple hash to get the job done. This probably should not be used for really …

Software Development perl
Member Avatar for sensamurai
1
1K
Member Avatar for abelingaw

[URL="http://www.daniweb.com/forums/thread341763.html"]http://www.daniweb.com/forums/thread341763.html[/URL] Regards to that, i also wanted the system not to be able to delete Administrator Accounts via my code also posted there. Here's the code again: [CODE] Private Sub cmdDelete_Click() ' On Error GoTo err Dim intYN intYN = MsgBox("You are about to delete a record." & vbCrLf & …

Software Development visual-basic
Member Avatar for AndreRet
1
146
Member Avatar for ntrncx

hey,thats my first post,i started recently to have for hobby programming,and i am really interesting to learn. anyway i have a problem i write a program that use some classes objects my problem is probably fundamental but i couldnt find answer on net. i have one header file that i …

Software Development c++
Member Avatar for ntrncx
1
452
Member Avatar for Tech B

This is a facial recognition system. Supports one face so far. This is an example ported from C++ to python. To see the original and to obtain the dll used visit [URL="http://www.kyb.mpg.de/bs/people/kienzle/facedemo/facedemo.htm"]this site.[/URL] I do not take credit of the dll, only the ported python code. The comments in the …

Software Development python
Member Avatar for Tstrv
1
659
Member Avatar for Fjolsvidr

I'm looking to learn C++ from online sources. Which would you recommend considering I have no prior programming experience. Also, is it necessary or helpful to learn C beforehand?

Software Development c++
Member Avatar for mike_2000_17
1
128
Member Avatar for BillWebber

Hi, I am a beginner who is trying to write a small piece of code which holds down the FN key and presses the F10 key. I think this is called a keypress or keydown. I have a brain injury which causes memory problems and makes it very difficult for …

Software Development vb.net
Member Avatar for BillWebber
1
126
Member Avatar for bisiii

Hi, How to make at code that calculator will operate with 3 numbers (Example: 15 - 2 * 5) and that [U]multiplication and division[/U] have precedence over [U]addition and subtraction[/U] ? At that code it operates just with 2 numbers: [CODE] int num1; int num2; string operand; float answer; Console.Write("Please …

Software Development
Member Avatar for ddanbe
1
2K
Member Avatar for _neo_

I have two codes in C and in Python. They gave me different results. Can anybody explain how they works, why I get different results? Thank you in advance!!! In C: ----------- #include <stdio.h> int main() { int a = 100; printf("%d = %02x\n", a, a); a = ~a; printf("%d …

Software Development python
Member Avatar for _neo_
1
215
Member Avatar for TheInfam0usNZ

Hey, I'm trying to make it so when my program is started, a text box ("log") automatically says: "Placeholder1" *1 sec delay "Placeholder2" *1 sec delay "Placeholder3" I have set the text box to say "Placeholder1" using properties but I am having problems coding the rest. I know this may …

Software Development vb.net
Member Avatar for kvprajapati
1
107
Member Avatar for ColMatrix

Hello, I would like some help if anyone can. I have researched, research and I just cant do it anymore - I have to ask. Before I do, I know this is probably a simple answer, and your fed up of explainng it but from my research (lots) the example …

Software Development perl visual-basic
Member Avatar for erezschatz
1
285
Member Avatar for ashwin149

thanks a lot I need another code where once I enter a text into a text box i need the data to be transferred to MS access without erasing any data(a new record is to be created)

Software Development visual-basic
Member Avatar for AndreRet
1
136
Member Avatar for zachattack05

I am working on a project that stores it's data in serialized files on the hard drive in a custom file format. The server end of the application accepts TCP connections from clients and returns data to the clients based on the query, it's kinda like a light weight, custom …

Member Avatar for mcriscolo
1
251
Member Avatar for problematic:)

hi. HAPPY NEW YEAR! :) I'm making a system that uses ms access2003 and vb6. My problem is how to search the database with two field names (namely: Lastname, Firstname) and yet I can still search them one by one. Ex. the Lastname field = "Smith" while the Firstname field …

Software Development visual-basic
Member Avatar for ChrisPadgham
1
620
Member Avatar for j111c222

Hi, I have encounter a strange result couldn't figured out. # Str with format "Mon MM HH", try to skip leading space in DD. my $str = "Jan 8 11"; # Jan, 8th 11 o'clock print substr($Str, 0,3) . [B]substr($Str, 4,2)=~s/^\s+// [/B]. substr($Str, 7,2) . "\n"; The result is "Jan11", …

Software Development perl
Member Avatar for erezschatz
1
170
Member Avatar for steven8579

I have two listboxes titled lstResult and lstResult2. lstResult clears with no problem using lstResult.Items.Clear() but when i use that for lstResult2 it dissapears but when i put in another value, the value(s) that i deleted come back. Also how do i fix the total to reflect the changes. Thank …

Software Development
Member Avatar for ShahanDev
1
2K
Member Avatar for Mike Askew

As the title suggests, i am trying to pull a bitmap image stored in a table location with an OLEObject type to my picture box on the form. The code i am using is as following: [CODE=VB.NET]img_ProductPicture.Image = DS.Tables("LocationInfo").Rows(0).Item(5)[/CODE] The error i am receiving is an InvalidCastException: Unable to cast …

Software Development image vb.net
Member Avatar for Mike Askew
1
867
Member Avatar for vegaseat

This little code snippet shows you how you save a wxPython canvas drawing to a standard image file.

Software Development image python
1
2K
Member Avatar for Cup of Squirrel

Ok, time to get off my ass and learn C and C++. However, I'm having a bit of trouble finding a free compiler; I'm a newbie so it needs to have a friendly and explanatory GUI if possible. Just post name and/or link, thanks :D

Software Development c++ first-post gui
Member Avatar for mslade
1
2K
Member Avatar for aplh_ucsc

[CODE] //myMalloc.c #include<stdio.h> #include<unistd.h> #include<stdlib.h> void *newMalloc(size_t vol); void newFree(void *adPtr); void save(); void search(); void *findSpace(); void freelist(); static int buf[12500]; void *newMalloc(size_t vol){ // some code } void save(){ // some code } void search(){ // some code } void newFree(void *adPtr){ // some code } void *findSpace(){ …

Software Development c
Member Avatar for aplh_ucsc
1
128
Member Avatar for jaycastr

Hey guys im getting back into Java after a break from programming. And i was wondering what is the best integrated development environment for running java.Im sure there is no one Best, but your input would be greatly appreciated.

Software Development ide java
Member Avatar for Akill10
1
460
Member Avatar for ivan26

Can anyone help me solve this problem? pass by reference/value and file i/o should be used.. Write a C++ program which will read in a list of numbers, find the average of all numbers, the average of thepositive and negative numbers, and the largest element. Your program should contain at …

Software Development c c# c++
Member Avatar for floatingDivs
1
241
Member Avatar for steven8579

I have a listbox titled lstResult1 and lstResult2. I am pretty new to C# programming. I am trying to save the two list boxes along with the rest of the file. I was able to save the three textboxes to the file but i cant get the two listboxes to …

Software Development
Member Avatar for steven8579
1
172
Member Avatar for blur0224

So I'm building a web crawler for a pet project I've been working on. I'm using tutorial code for the crawler then building on it. I've done extensive troubleshooting and haven't had any luck. The problem: [LIST] [*]Roughly half the websites return content, but all of them return headers. [*]Some …

Member Avatar for blur0224
1
312
Member Avatar for seanbp

I read about a coding style where not one variable is changed. Everything must stay constant. I don't remember what it's called, but it's the bomb. I never realized this little project would be [I]so easy[/I]. Here is a 98 line calculator that supports [B]()^*/+-[/B]. If you find a bug, …

Software Development java
Member Avatar for seanbp
1
1K
Member Avatar for mag12203

Can someone help me figue out why I keep getting an erorr that I am missing a return statement. [CODE] import java.util.*; public class ec1 { static Scanner kb = new Scanner(System.in); public static void main(String[] args) { String word = " "; String s = " "; char letter; …

Software Development java
Member Avatar for mag12203
1
160
Member Avatar for newbie14

Dear All, I have java listener which keep reading for incoming data to the particular port. Most of the times it works fine only at times it gets too many open files error. Below is my codes what could be wrong? Thank you. [CODE]public static void main(String[] args) { try …

Software Development java
Member Avatar for newbie14
1
4K
Member Avatar for ge0rge007

Hello all! I am trying to create a server - client bundle that will let me send simple messages with ssl support. I am quite new at java and i can't figure out what my problem is. I am running the server and client programs at 2 computers at the …

Software Development client-server java
Member Avatar for ge0rge007
1
167
Member Avatar for shadowscape

[CODE]// Project: XorLib - Xor Encryption Libary. // Copyright: Copyright © 2009-2010 Shadowscape Studios. All Rights Reserved. // Developer: Shadowscape Studios // Website: http://www.shadowscape.co.uk // Support: support@shadowscape.co.uk // Version: 1.0.0.0 // Release: 151220102240 #define export __declspec (dllexport) #include <stdio.h> #include <stdlib.h> #include <string.h> #include <windows.h> long filesize(FILE *f) { long …

Software Development c c++ encryption
Member Avatar for shadowscape
1
765
Member Avatar for mahdi68

Hi how can i compare to array in C# ? i use this code but it`s result is false (must be true) ? [CODE]Array.Equals(childe1,grandFatherNode) [/CODE]

Software Development c#
Member Avatar for Mitja Bonca
1
3K
Member Avatar for Colin Mac

Hi, I'm a beginner and just started Turbo C I wrote this program in the editor main() { float years, days; printf ("Please type your age in years:"); scanf ( "%f", &years); days = years * 365; printf ("You are%.1f days old.\n", days); } I then run the program and …

Software Development c
Member Avatar for Shankye
1
284
Member Avatar for DarthMustard

Hi, I am writing a simple program modeling client/server interaction. I want the server to be capable of handling multiple connections. To implement this, I have been using _beginthreadex, passing references to sockets to the child thread. For example: [code]while(1) { SOCKET sClient = accept(ListenSocket, NULL, NULL); ... child = …

Software Development c++ client-server
Member Avatar for thelamb
1
753
Member Avatar for Diamonddrake

I am working on an application that lets you play drum sounds using a rockband drum kit. Current version available [URL="http://www.diamonddrake.com/software.aspx?title=RockBand%20Drum-Kit"]here[/URL] I am wanting to add a recording function but all I can think of is loop back recording. That's manageable but in Vista and Windows 7 by default the …

Software Development windows-vista
Member Avatar for Diamonddrake
1
197
Member Avatar for Gribouillis

This snippet generates the best rational approximations of a floating point number, using the method of continued fractions (tested with python 2.6 and 3.1).

Software Development mathematics python
Member Avatar for Gribouillis
1
1K
Member Avatar for DynamicMember

i have this code,and it works.but after running it closes after milliseconds.anywhere i put "getch()" gives error.what to do?[code]#include <iostream> using namespace std; int main() { int i,j,k; for( i = 10; i >= 1; i-- ) { for( j = 1; j < i; j++ ) { cout << …

Software Development c++
Member Avatar for profyou
1
113
Member Avatar for bettybarnes

pls check my database design and give comments. i'm a newbie database designer i dont have any experience, i've researched on the net but i think it's not enough. here's my ERD: [IMG]http://i43.photobucket.com/albums/e355/bettybarnes/asas.jpg[/IMG]

Software Development database-design vb.net
Member Avatar for lolafuertes
1
147
Member Avatar for Alexkid

Hi, Simple question but why would someone use #define. Whats the difference between; #define sum 1 and const int sum = 1; both can't be changed and anywhere you sum its going to be 1!. Many thanks Alex

Software Development c++
Member Avatar for Alexkid
1
120
Member Avatar for frankchester

Hi, I'm a newbie to programming in general and I'm really struggling with working out how on earth to do this! I am aware of how to open the stream and read the text file using fscanf, however I want to store the text in that file into a string …

Software Development c file-stream
Member Avatar for frankchester
1
38K
Member Avatar for tdba.316

Hey :D this is my first post here^^, and it's a problem with an exercise from the book C++ Primer Plus, which I have been self-studying (I'm the beginner). The following code is how I did the exercise, which is in the header comment. It was built in VC++ 2010, …

Software Development c c# c++ programming-construct
Member Avatar for tdba.316
1
1K
Member Avatar for d5e5

Someone mentioned in another thread they had found and downloaded [URL="http://search.cpan.org/~adamk/ORLite-1.45/lib/ORLite.pm"]OrLite[/URL], presumably to consider using it to access data in an SQLite database. Since, to use OrLite you need to have the DBI and DBD::SQLite modules installed on your computer as well, I think you could just use DBI to …

Software Development perl sqlite
Member Avatar for d5e5
1
261
Member Avatar for MikeTackett

I consider myself still a novice programmer but I'm starting to develop and maintain applications with end users for the company I'm working for. We don't have a policy on version numbers and I'm looking for advice on when best to update them. I understand the major.minor portion is largely …

Software Development vb.net
Member Avatar for kvprajapati
1
256
Member Avatar for ace8957

Hi all, So I have reached a kind of impasse on my current project. I'm trying to make a program that can function like a phone book, loading information from a file into a binary search tree and performing operations on said information. The issue I'm having appears to be …

Software Development c++ data-structure file-system
Member Avatar for ace8957
1
7K
Member Avatar for TrustyTony

Here another small snippet of mathematical nature returning all possible divisors of number. (set is, by the way, needed because of perfect squares Not possible to edit the snippet part but here the same with less stupid command line interface (not repeating the loop): [CODE]def divides(n): return sorted(set(sum( ([x,n/x] for …

Software Development mathematics python
Member Avatar for TrustyTony
1
877
Member Avatar for mancode1007

I am quite confused how to encrypt the password store in the database so that if the database found by pupil it cannot take password from the table .Anyone can show me how to encrypt password .I m using microsoft acess as the databese. please help ....thx

Software Development encryption vb.net
Member Avatar for Luc001
1
283
Member Avatar for ashishkumar008

A jagged array is an array whose elements are arrays. The elements of a jagged array can be of different dimensions and sizes. A jagged array is sometimes called an "array of arrays". [COLOR="Red"]NOTE:-[/COLOR] I'm using Single dimensional jagged array. Actually I am using single and multi dimensional arrays as …

Software Development
Member Avatar for Shlesh
1
139
Member Avatar for tottletj

Basically I've looked everywhere for help with this problem and been unable to find any so i thought i'd ask here. I have a text file full of numbers which i wish to manipulate. the actual text file has about 200 rows and 10 columns, but in this example i'll …

Software Development file-system python
Member Avatar for Gribouillis
1
105
Member Avatar for niehaoma

The purpose of this is to obtain a genuine critique of my source code (based on a fairly simple concept). I realize I may not have the cleanest implementation for testing for prime, due to the fact I am not an aspiring mathematician. I am interested on critique of the …

Software Development c
Member Avatar for hsetaknev
1
190
Member Avatar for artemis_f

I normally program in Java and Haskell to me seems completely alien and weird. All I want to do is read the contents of a file into a big string then be able to do stuff with that string like split it on newline and store it in a list …

Software Development
Member Avatar for sweetypie
1
1,000
Member Avatar for jon.kiparsky

Most of the posts here are from people with problems, looking for help. I thought I would try to talk a bit about ways to find your way out of "stuck". It's been on my mind lately, since I've been wrestling with Swing and it's been winning. Finally worked out …

Software Development algorithm java java-swing oracle
Member Avatar for apines
1
127
Member Avatar for Buffalo101

Hello, I'm trying to change the look of java apps to something native. In my first JFrame, I'm using: [code=java] try { //org.fife.plaf.VisualStudio2005.VisualStudio2005LookAndFeel //de.javasoft.plaf.synthetica.SyntheticaStandardLookAndFeel //com.jgoodies.looks.plastic.Plastic3DLookAndFeel //UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (UnsupportedLookAndFeelException e) { …

Software Development java java-swing
Member Avatar for leiger
1
159
Member Avatar for timdog345

I need t o make these paterns [code] * * ********** ********** ** ** ********* ********* *** *** ******** ******** **** **** ******* ******* ***** ***** ****** ****** ****** ****** ***** ***** ******* ******* **** **** ******** ******** *** *** ********* ********* ** ** ********** ********** * * [/code] I …

Software Development c++
Member Avatar for coldzero_82
1
119

The End.