Quantcast
Channel: Pete Ware » Technology
Browsing latest articles
Browse All 10 View Live

Closer to a new car?

It’s one step closer to happening! Getting a new car based on a trade in might actually happen. It hasn’t passed the House yet (much less the Senate) but the leadership of both parties agree on doing...

View Article



A better output_iterator

I was using the [std::stream_iterator](http://www.cplusplus.com/reference/std/iterator/ostream_iterator/), for example: [cc lang="cpp"] std::vector vals; vals.push_back (12); vals.push_back (22);...

View Article

Functor for deleting objects

In a destructor for a class, I had a [std::vector](http://www.cplusplus.com/reference/stl/vector/) of pointers that I wanted to delete. I started to write the usual for(;;) loop and realized I do this...

View Article

Getting the keys from a std::map

So last week I wrote about [initializing a std::map](http://www.peteware.com/blog/2009/05/copying-a-stdvector-into-a-stdmap/) from two [std::vectors](http://www.cplusplus.com/reference/stl/vector/)....

View Article

Delay

Sorry for the long delay. I’ve been playing around a bit.

View Article


Image may be NSFW.
Clik here to view.

Google dominating search

There’s talk that [Bing](http://www.bing.com) has gotten to a 10% market share in search. [Apple...

View Article

Purpose vs. Profit Motive

Daniel Pink has some surprising results about what motivates people. Mostly, if there’s any creativity, then more money doesn’t provide more motivation — and may even unmotivate....

View Article

Jeopardy playing computer

From NY Times is this article [Smarter Than You Think - I.B.M.'s Supercomputer Challenges 'Jeopardy!' Champions - NYTimes.com](http://www.nytimes.com/2010/06/20/magazine/20Computer-t.html?hp) about how...

View Article


Switching keys in values in a map

A functor that reverses a pair: first becomes second, second becomes first. Useful for switching from a map to another map (or multimap in this example) where the value becomes the key and the key the...

View Article


C++ test for within

I found myself having to right a bunch of range checking code like this: [cc lang="cpp"] if (val 1.0) val = 1.0; [/cc] so I wrote this simple function. [cce lang="cpp"] include template const Type...

View Article
Browsing latest articles
Browse All 10 View Live




Latest Images