Tag Archive for 'Download'

Page 3 of 4

Simple C++ String Class

Every C++ programmer knows that the standard library has a string class. But, while learning, it’s a good idea to know how to develop your own string class.

That’s why I made the String class. It’s not intended for professional projects (for them, you should use the standard library’s string), but as help to learn C++.

class String
{
	char *m_pszString;	//Allocated buffer
	int m_nAllocated;	//Allocated length

public:
	//Construction and destruction
	String() { /* ... */ }
	~String() { /* ... */ }

	//Copy constructors
	String(const char *pszString) { /* ... */ }
	String(const String& rsString) { /* ... */ }

	//Operators (assignment)
	String& operator=(const char *pszString);
	String& operator=(const String& rsString) { /* ... */ }

	//Operators (concatenation)
	String& operator+=(const char *pszString);
	String& operator+=(String& rsString) { /* ... */ }
	String operator+(String rsString);

	//Operators (comparison)
	bool operator<(String sString) { /* ... */ }
	bool operator<=(String sString) { /* ... */ }

	bool operator>(String sString) { /* ... */ }
	bool operator>=(String sString) { /* ... */ }

	bool operator==(String sString) { /* ... */ }
	bool operator!=(String sString) { /* ... */ }

	//Operations
	void Clear();
	String Lower() { /* ... */ }
	String Upper() { /* ... */ }

	//Information
	int Length() { /* ... */ }

	//Cast operators
	operator const char*() { /* ... */ }

protected:	//Helper functions
	/* ... */
};

//Output e input
std::ostream& operator<<(std::ostream& oStream, String& rsString);
std::istream& operator>>(std::istream& iStream, String& rsString);

Keep reading…

Incoming search terms for the article:

cppMemDbg – Easy to use C++ memory leak detection library

This library is the C++ sequel to the cMemDbg.

Just as the cMemDbg, it is a very easy to use library which can help you to detect and track memory leaks.

Its usage is very similar to the cMemDbg, but with support for the C++ operators (new, new[], delete and delete[]).

There are lots of solutions for this on the net, but this one has the particularity of being really simple to implement.

>new  003D26D8  36  [Main.cpp:127]
>new  003D2708  36  [Main.cpp:128]
>ERROR  Bad free type  free => delete  003D2708  36
(Main.cpp:128)
>free  003D2708  36  (Main.cpp:128)  [Main.cpp:129]
>free  003D2708  0    [Main.cpp:130]
>ERROR  Trying to free unallocated memory: 003D2708
[Main.cpp:130]
>delete[]  003D3EB0  7  (String.cpp:59)  [String.h:41]
[...]
>delete[]  003D24F0  4  (String.cpp:59)  [String.h:41]
>delete  003D2490  40  (Lista.h:120)  [Lista.h:112]
>INFO  PROBLEM: Memory leak found (36 bytes)
>INFO  Unfreed block  003D26D8  36    [Main.cpp:127]

Keep reading…

Incoming search terms for the article:

SMS Scheduler

4 o’clock in the morning… You’re going late to bed… Suddenly, you remember you had to send someone a message with some important information he should have at 9 o’clock…

Of course you don’t want to wake up at 9:00… If you send the message at this moment, you’ll probably wake him up if he didn’t power off the phone (he deserves it! :) )…

So what can you do? This tool is the answer…

SMS_Scheduler_1

Keep reading…

Incoming search terms for the article:

Attendance Control (wxWidgets Version)

wxAttendanceControl is a GUI version of Attendance Control.

It’s been prepared as a further introduction exercise to the wxWidgets GUI (Graphical User Interface) usage (the basic introduction exercise was the Celsius to Fahrenheit application).

For the complete exercise explanation please visit the original Attendance Control exercise.

wxControlAsistencia1

Keep reading…

Incoming search terms for the article:

Celsius to Fahrenheit

If you just want to convert temperatures by using a website, you should visit the online celsius to fahrenheit conversion tool. Otherwise, keep reading…

This is a very tiny and simple application I’ve written to teach the basic usage of wxWidgets as an introduction to GUI (Graphical User Interfaces).

Its purpose is just what it’s name says: converting from celsius degrees to fahrenheit degrees (and sideways).

CelsiusAFahrenheit

Keep reading…

Incoming search terms for the article:

Attendance Control

“Attendance Control” is a console application made as an exercise to integrate the different C++ concepts taught in class up to the middle of the year.

The main objective is to be able to develop a employee attendance control which records the times (and justifications, if corresponding) of each time the employees arrive, go to lunch, return from lunch and go back to home.

Sistema de control de asistencia de personal
--------------------------------------------

DNI:

Keep reading…

Incoming search terms for the article:

Wake On LAN (Remotely power on a computer)

Have you ever wondered how you could power on a computer remotely?

Well, with this program you can do it!

C:\>wol

Wake-On-Lan (WOL) Tool v1.0 by NeoEGM

http://www.neoegm.com/software/wake-on-lan/

-------------------------------------------

Usage: wol 

Wakes the computer with the specified MAC address.

Accepted MAC address formats: 01-4B-8E-00-52-A1
                              01-4b-8e-00-52-a1
                              01:4B:8E:00:52:A1
                              01:4b:8e:00:52:a1
                              014B.8E00.52A1
                              014b.8e00.52a1
                              014b8e0052a1
                              014B8E0052A1

Keep reading…

Incoming search terms for the article:

WP-No-Format WordPress Plugin (Prevent HTML Code Formatting/Modification)

For the ones used to work with WordPress editor’s HTML mode and hate when it creates <p>s and reorganize <br/>s on its will (among other things), I’ve made this plugin.

I’ve been searching a lot for this kind of functionality and, since I couldn’t find any plugin which let you decide which parts of the code you’d want to leave “unformatted”, I started to write my own…

WP-No-Format

It’s very simple to use. After activating it, you can just type:

<!-- noformat on -->

on the WordPress editor, just before the part you want to protect, and from that point on, WordPress won’t touch the HTML code you write.

If you want to resume the standard “formatting” you have to type:

<!-- noformat off -->

And that’s all!

GNU GPL v3 WP-No-Format is licensed under the GNU GPL v3 (attached)…

Update (version 1.1): added convert_chars function support. Before, some characters got converted to HTML entities (for example, when writting “&&” appeared as “&#038;&”). [Update recommended]

Here is the change log.

Latest WordPress version tested with: 2.8.4

Incoming search terms for the article:

Guitar Trainer

Guitar Trainer is a program I’ve written to make easier the learning of the position of the different notes in the guitar fretboard. There are lots of features pending to be implemented (including sound, different scales, guessing game by position and by sound, etc.), but it’s quite useful with its current functionality.

GuitarTrainer_FullFretboard

Keep reading…

Incoming search terms for the article:

PHP random password generator

As a new sequel to the Excel random password generator and the Random password generator, I’ve made a PHP random password generator service…

You can call it this way (if you hover the parameter values, you’ll get an explanation):

http://www.neoegm.com/services/random_password.php?length=8&upper=1&lower=1&numbers=1

So, for example, to generate a 10 characters numeric password you could access:

http://www.neoegm.com/services/random_password.php?length=10&upper=0&lower=0

Want the source code?

Incoming search terms for the article: