199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for vegaseat

A simple program to count the words, lines and sentences contained in a text file. The assumptions are made that words are separated by whitespaces, and sentences end with a period, question mark or exclamation mark.

Member Avatar for snippsat
2
2K
Member Avatar for TrustyTony

From python.org official website: [URL="http://python.org/download/releases/2.7/"]Python 2.7[/URL] [B][I]Python 2.7 was released on July 3rd, 2010[/I].[/B] Python 2.7 is scheduled to be the last major version in the 2.x series before it moves into an extended maintenance period. This release contains many of the features that were first released in Python 3.1. …

Member Avatar for TrustyTony
2
442
Member Avatar for happygeek

iPad users in the USA have found themselves caught up in a security gaff which saw subscriber data of some 114,000 of them exposed for anyone to see. Subscriber data such as email addresses the Integrated Circuit Card ID that authenticates them on the AT&T network. The security researchers which …

Member Avatar for happygeek
2
452
Member Avatar for EireJoker

Hello Daniweb :) I am currently doing a programming assignment for college and have hit a brick wall. I am getting an error while trying to fill a combo box. [CODE]Private Sub Form_Load() 'Fill the Network List With adoNetwork.Recordset [COLOR="Red"] Do Until .EOF[/COLOR] If !Networks <> "" Then cboFilterNetwork.AddItem !Networks …

Member Avatar for arjunad
2
156
Member Avatar for tyson.crouch

G'day, I've got my SCMA tomorrow morning, and I thought i would post up my notes. These notes are intended as a general tutorial/guide for MySQL. [B]It covers the following topics:[/B] [B]Section 1: Theory, Terminology and Concepts (10%)[/B] [LIST] [*]Client/Server Concepts [/LIST] [B]Section 2: Data Definition using SQL (25%)[/B] [LIST] …

Member Avatar for rajarajan2017
2
225
Member Avatar for mrnutty

Its this side thing I was working one, when I got the chance. Its not very good right now, as its still in its developing stage. But its still ok, where I can show it of, lol. Attached is an exe, that given a set of data points, it tries …

Member Avatar for NathanOliver
2
168
Member Avatar for DaveTran

When using OR with an if statement does the computer check both statements if the first statement returns true? [CODE] bool a = true; bool b = LongComplicatedMethod(); if (a || b) { Console.WriteLine("Hello"); } [/CODE] So say the boolean b has its value determined by a long complicated algorithmic …

Member Avatar for DaveTran
2
200
Member Avatar for toitoi

Hi, If I static cast an object of a derived class to its base class, the object's virtual methods should be those of the base class. But this doesn't seem to be the case if I call such a virtual method via another method. The following is an extremely simplified …

Member Avatar for toitoi
2
112
Member Avatar for snippsat

Many of us like wxpython,so is always fun with a new tool.:) [url]http://wxformbuilder.org/[/url]

Member Avatar for joetraff
2
925
Member Avatar for tyler_kid_a

I have code such as this: [CODE=C#] string url = "http://en.wikipedia.org/wiki/Earth"; System.Windows.Forms.WebBrowser wb = new System.Windows.Forms.WebBrowser(); wb.Url = new Uri(url); [/CODE] but after that last line wb.Url is always null. Also, if the last line is replaced with: [CODE=C#] wb.Navigate(url); [/CODE] wb.Url and wb.Document are always null. What is going …

Member Avatar for kvprajapati
2
188
Member Avatar for theausum

Code to Execute an SQL Script in JDBC. The SQL Script should have comments starting with - or -- only on new lines and each command should end with a ; . Reading a sql file and putting all of it in a string variable and feeding to the execute …

Member Avatar for fatso83
2
3K
Member Avatar for oggiemc

Hi everyone, Ive been asked to do an assignment to test the randomness of a linear congruential generator..We've been given the code implemented in c..the problem is i dont really see how this code relates to the theoretical LCG equation i.e X[n+1] = (aX[n] + c) mod m..So i would …

Member Avatar for invisal
2
1K
Member Avatar for peter_budo

In my current project we need to provide drag&drop functionality of items from left to right and vice-versa and on click of the button send array of item IDs to server. Main problem was that we couldn't get array across to server and online examples that we found did not …

2
908
Member Avatar for vegaseat

Looking at the First In First Out (FIFO) data situation. Just like a line at the grocery store check-out. Its counterpart FILO would be like a stack of dinner plates.

Member Avatar for mitrmkar
2
234
Member Avatar for melissa2185

What I need to do is using classes, design an online address book to keep track of the names, address, phone numbers, and birthdays of family members. The program should be able to handle a maximum of 500 entries. a. Define the class Address that can store a street address, …

Member Avatar for Ezzaral
2
261
Member Avatar for bunnyboy

Hello guys! At school we were given a homework to read some info from web page and display it. While surfing over net for some infos how to approach to this a came across at HTML Agility Pack. I decided to use it. But I have some problems with parsing …

Member Avatar for bunnyboy
2
184
Member Avatar for ddanbe

There seems to be a lot of shuffling going around here lately. So I looked [url=http://en.wikipedia.org/wiki/Shuffling]here[/url] to learn about the Fisher-Yates shuffle etc. But unless my English is not good enough I did not find anything about the way we shuffle a card deck here. Take a deck in your …

Member Avatar for ddanbe
2
781
Member Avatar for vegaseat

We take a look at the various functions of module time, counting seconds and milliseconds, measuring the time a simple for-loop takes, inspect a list of time data and ways to display it in a useful manner. An attempt is made to find the day of the week, given a …

Member Avatar for Kanem
2
2K
Member Avatar for newsguy

Ten percent of people working in the electronics and telecom sector have not read a book for pleasure in the last year. During the same 12 month period, 35 percent had not learnt a new activity or indulged in a new hobby either. According to the Department For Business, Innovation …

Member Avatar for zaphodb777
2
580
Member Avatar for josolanes

Memo.h: [CODE=cpp] #ifndef _MEMO_H #define _MEMO_H #include <stdlib.h> #include <string> #include <typeinfo> #include <iostream> #include "Date.h" #include <map> #include <vector> using namespace std; class Memo { public: map<Date, vector<string> > Appointment; //void delMemo(int x); void addMemo(Date myDate,string x); }; #endif /* _MEMO_H * [/CODE] Memo.cc [CODE=cpp] #include <stdlib.h> #include <string> …

Member Avatar for josolanes
2
224
Member Avatar for Themanhunt

Lets say that you are working on a program such like Notepad, for instance. You want to make a Ctrl+S key event to save your work. This is the ONLY way I have found out that does not cause any conflictions at all. In the KeyUp Sub of, leys say, …

Member Avatar for Themanhunt
2
856
Member Avatar for Gl0mby

I'm a bit of a novice when it comes to programming, wanting to learn. I'm trying to write a program that has a while loop in it, or preferrably a do..while loop but I can't seem to call methods within a nested if statement in the while loop. How is …

Member Avatar for Geekitygeek
2
125
Member Avatar for linq

[code] // Windows Programming Tutorial Series #include "stdafx.h" #include <windows.h> int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MessageBox (NULL, "Hello World! This is my first WIN32 program", "Lesson 1", MB_OK); return 0; }[/code] 2 errors: Linking... LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/a.exe : …

Member Avatar for NathanOliver
2
196
Member Avatar for return_Milk

A couple things to mention: 1.) This program uses system("PAUSE"); in the main function, if you are not using Windows, you might have to pull it. 2.) There are a couple lines in there that are not needed, I'm just using them to test the size of the array. My …

Member Avatar for return_Milk
2
140
Member Avatar for newsguy

Would you back Avatar (the movie) or [URL="http://www.daniweb.com/news/story248510.html"]Modern Warfare 2[/URL] (the game) to win a fight for the biggest grossing entertainment blockbuster of the last six months? Given that Avatar has already stormed up the biggest movie blockbuster list to sit comfortably near the top as the second biggest grossing …

Member Avatar for Abdullah Baig
2
403
Member Avatar for tux4life

Some things you need to know: [LIST] [*]This code is not efficient, if you want a more efficient solution, then turn to the STL algorithm [URL="http://www.cplusplus.com/reference/algorithm/next_permutation/"]next_permutation[/URL]. [*]When there are double characters (i.e. characters which occur multiple times) in the string to permute then some permutations will be generated multiple times. …

2
1K
Member Avatar for restrictment

Alright, this is the best text based RPG I have created, and I have refined all the bugs and such. I have gotten a few questions on whether it is beatable without dying, and it IS beatable without dying, but be aware that you most likely will die quite a …

Member Avatar for rom87
2
922
Member Avatar for Coomanperson

Hi everyone, new to the DaniWeb community, i have always used it for homework help in the past, but i'm about to rip my hair out if i stare at this code for another hour. basically the project is to write a code that reads data from a file, gets …

Member Avatar for Coomanperson
2
173
Member Avatar for kilon666

I want to find the determinant of a square 4x4 matrix using a minor and cofactor. And I want those in three seperate functions where i is the number of rows and j is the number of columns: [CODE]double minor(double a[][4], int row, int column);[/CODE] Done by removing a row …

Member Avatar for sfuo
2
4K
Member Avatar for Clawsy

Hi I'm writing a client/server remote viewer application where screenshots of the desktop are sent across the network over a socket. I'd like to reduce the size of the transfer by getting [I]the difference between the two images and then sending the difference[/I]. The difference would be at least a …

Member Avatar for Clawsy
2
4K
Member Avatar for ddanbe
Member Avatar for ddanbe
2
999
Member Avatar for happygeek

In an [URL="http://www.guardian.co.uk/technology/2010/jan/24/computer-security-crime-anonymous-datasets"]interview[/URL] with The Observer newspaper, Dr Ian Brown from the Oxford Internet Institute who is writing a report on anonymous datasets for the European Commission warns that "criminals could identify individuals through mobile phone data and use the information to track people's movements and find out when they …

Member Avatar for DeAnonym
2
309
Member Avatar for songweaver

Hey guys, I am brand spanking new to C# and am not only wondering about the syntax, but also the logic of how to do this, my professor just threw us to the wolves with this problem and we haven't gone over any of the syntax or anything, I am …

Member Avatar for apegram
2
2K
Member Avatar for jigvesh

Many of us are often required to submit project reports for the softwares developed by us...is there any standard format that needs to be followed???Also are there any sample reports available for reference????

Member Avatar for Nick Evan
2
144
Member Avatar for freeseif

Hi programmers, I want read line by line a Unicode (UTF-8) text file created by Notepad, i don't want display the Unicode string in the screen, i want just read and compare the strings!. This code read ANSI file line by line, and compare the strings [B]What i want[/B] Read …

Member Avatar for Ancient Dragon
2
2K
Member Avatar for Chetan_

This is the first big program I'm gonna do and so far, i have really no idea on how to go about it. Basically, I aim to create a C++ program that:- [LIST=1][*]Takes expressions of the form... [TEX](3+4(5*2)+(3/(sin 62))-4)[/TEX] or similar ones and evaluates them [*]Takes equations of the form …

Member Avatar for Chetan_
2
112
Member Avatar for Ancient Dragon

The idea for this came from another thread in the C++ forum that wanted to duplicate the _getdelim() function that is supported by GNU compilers g++. I made one major change in that this version does not allocate new memory every time it is called, which is grossly inefficient. Instead, …

Member Avatar for Ancient Dragon
2
318
Member Avatar for Gribouillis

This snippet provides 2 functions to create in memory a gziped archive of a sequence of files and directories, and to extract files from this archive. These functions are similar in effect to the linux commands [icode]tar czf[/icode] and [icode]tar xzf[/icode] but instead of writing an archive file on disk, …

2
4K
Member Avatar for tillaart36

Hello, im trying to implement a template matching algorithm with the use of Python + PIL and I'm trying to follow the code that wikipedia gives for template matching -> [URL="http://en.wikipedia.org/wiki/Template_matching"]http://en.wikipedia.org/wiki/Template_matching[/URL] Basically it loops through all pixels of a search image, and all pixels of a template. The sum of …

Member Avatar for vegaseat
2
3K
Member Avatar for plusplus
Member Avatar for grealish234

hey i have a problem with adding an is numeric checker to my code for my class when i hit a snag just wondering if i could get some help this is my first program so help is appreciated [CODE]// fun with physics.cpp : Defines the entry point for the …

Member Avatar for mrnutty
2
114
Member Avatar for vegaseat

Convert a decimal (denary) integer to a binary string. An exercise in do ... while and while loops.

Member Avatar for arun26
2
2K
Member Avatar for mrnutty

Some background. We all used the string class, but some of you might not know that string is just a typedef of basic_string. In fact here is the typedef you might find when looking in the XString library. [code] typedef basic_string<char, char_traits<char>, allocator<char> > string; [/code] This code snippet shows …

Member Avatar for Dave Sinkula
2
3K
Member Avatar for NoviceChrilill

Hi, I have the problem that a char ch2 = '\u0041' is confirmed as a character and also printed as "A", but the char ch3 = '\u00c6' , which is also confirmed as a character, is not printed only as a "?" where it is supposed to be a "æ". …

Member Avatar for NoviceChrilill
2
259
Member Avatar for Geekitygeek

Hi Guys, Firstly, Happy New Year!! Second, here my first query of the new year: I am using a stored proceedure to retrieve records from a database that match a number of search parameters. I now want to show a subset of those records in my Datagridview. I [B]don't[/B], however, …

Member Avatar for Geekitygeek
2
149
Member Avatar for newsguy

According to the British government organisation which helps UK-based companies to succeed in the wider global economy, UK Trade & Investment ([URL="http://www.uktradeinvest.gov.uk"]UKTI[/URL]), it is currently helping some 76 UK companies pitch for business with the European particle physics laboratory, CERN. Apparently, CERN spent a massive £110 million ($175.75 million) on …

Member Avatar for rupertmckenzie
2
306
Member Avatar for Stefano Mtangoo

I have asked the same Question on C++. So far I have moderately mastered PHP a little and more of Python. I want now to add up Java/C++ So what I need to know to be Java expert in Web and Desktop Applications? Are they two different beasts? Thanks Guys

Member Avatar for kingsboro2008
2
193
Member Avatar for sknake

Does anyone have an idea why these console colors aren't coming out properly? Some of them work and some come out as junk. [code] using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace daniweb.capp { class Program { static void Main(string[] args) { const string s = "0020002000200020007c007c003a003a007c003a007c007c002000200020002e" + "002d002d002d002d002d002d002d002d002c000d000a0020002000200020007c" …

Member Avatar for sknake
2
357
Member Avatar for lowhzplayinfool

So this is a homework question, but i've been doing endless reading and am really clouded over!! I have to use an Object Oriented approach to gain the higher marks for this but I can't work out whether i'm going about this all wrong. Is it possible to have just …

Member Avatar for lowhzplayinfool
2
313
Member Avatar for cwarn23

Recently I have installed php 5.3 on a pc and just like many posts on this forum have been saying the latest version of php does not guarantee 100% backwards compatibility. Especially for some oop parameters where the symbol "&" needs to be used before the variable at specific points …

Member Avatar for Atli
2
156

The End.