Tag Archive for 'List'

Firefox Add-on: List Open URLs

Let’s say you’re searching for videos (or webpages if you wish) of some topic. And you navigate through lots and lots of them… Opening new tabs and even jumping between links without leaving the previous URL open somewhere else (this commonly happens when you click any “Related Video” on YouTube, since it automatically opens on the same tab)…

It would be really tedious to go through each of your tabs rescuing all the interesting URLs to save them…

Also, if you could save them as bookmarks (assuming you don’t care about the browsing history), it’s not really simple to just get the URLs to copy them or to send them to somebody else…

For this (and for any other case you could find), I developed the “List Open URLs” Firefox Add-on…

ListOpenURLs_Menu

Keep reading…

Incoming search terms for the article:

Simple C++ List Class

Just as I published some days ago the Simple C++ String Class as a C++ learning exercise, now I am freeing a Simple C++ List Class.

The standard library has a list class. But, while learning, it’s a good idea to know how to develop your own list class.

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

template <class TYPE>
class List
{
	/* ... */

public:
	//Construction and destruction
	List() { /* ... */ }
	~List() { /* ... */ }
	
	List(const List& rlList) { /* ... */ }
	
	//Assignment operator
	List& operator=(const List& rlList);

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

	//Element managing
	int Add(TYPE& rtData);
	TYPE* Elem(int nPos);
	bool Delete(int nPos);
	void DeleteAll();
	
	//Search
	int Find(TYPE& rItem, int nStartAt = 0);

	//Operadores
	TYPE& operator[](int nPos) { /* ... */ }	//Elem
	int operator<<(TYPE& rdData) { /* ... */ }	//Add

protected:
	void FreeList();
	void Init() { /* ... */ }
};

//Output
template <class TYPE>
std::ostream& operator<<(std::ostream& oStream, List<TYPE>& rlList);

Keep reading…

Incoming search terms for the article: