Wednesday, June 24, 2015

List of online C++ compilers

I have been using the online C++ compiler, codepad, for the last few years to quickly test small bits of C++ code. Then I came across another one, Ideone, and then another and another and... until I needed to keep a list of them. There are other lists out there—in fact I started with the this one—but some aren't kept up to date or are incomplete. I needed my own list, so here it is, from best to worst, according to my admittedly cursory review.

Ideone GCC Great!
Koding GCC
Impressive, but might be too ambitious.
codepad GCC Basic.
Rextester Clang
HackerEarth GCC Basic.
Wandbox Clang
Basic, but can change compiler command-line options.
Coliru Clang
Basic, but can change compiler command-line options.
C++ shell GCC
GCC Explorer Clang
Intel ICC
Basic. Just compiles code and displays assembly-language output. GCC Hmm... Can debug your code! But they plan to charge.
WebCompiler VC++ Microsoft's online Visual C++ compiler. Rudimentary.
Coding Ground GCC Would be "Good" if console output wasn't duplicated 4 or 5 times.
Online Compiler GCC Crude. Doesn't run the code—you download the executable.
bOtskOOl ?
I never received the registration confirmation email.
CodeTwist ? Like a codepad "lite." JavaScript error when I tried to use it.
Comeau Comeau Crude, 90's web design. Currently down. Compile only?

I did something sort of like this twenty years ago. I had written a static-analysis tool for C (not C++) built on top of an extensible C parser I also wrote. I was playing around with sendmail at the time. I wrote a sendmail rule that ran the analysis tool on any C code in the body of an email sent to a particular email address and returned the resulting report to the sender.

Thursday, April 08, 2010

Sending email through Yahoo! with Windows Mail

Go to accounts in Windows Mail:

Click on Add button:

Select E-mail Account and click Next:

Enter your name as Display name and click Next:

Enter your Yahoo! email address and click Next:

Enter and for the incoming and outgoing server names, respectively, check the outgoing-authentication checkbox, and click Next:

Enter your Yahoo! account name and password and click Next:

Check the do-not-download checkbox and click Finish:

Select the new Yahoo! entry and click Properties:

Enter a better name for this account (optional), uncheck the include-this-account checkbox (we can't receive Yahoo! email anyway), enter other email address to which you want recipients to reply (optional), and click OK:

Select the new Yahoo! entry and click Set as Default (this causes all email to be sent via this account):

Click Close:

Thursday, October 01, 2009

I want a new mouse

One that wont make me sick
One that wont make me crash my car
Or make me feel three feet thick

I've tried a couple of mouses at work—an off-brand and one from Microsoft—both cheap, corded, optical, and with a scroll wheel. Every so often, the mouse cursor/pointer jerks to a corner of the screen. This happens with both of them. I've gone through Dell's online troubleshooting process, but to no avail. I'm thinking the cause may be their lowly LED-based sensors on my fake-wood laminate desk. Laser should be better, right, or anything that doesn't need to look at my desk surface? While I'm replacing it, I might as well consider the ergonomics, too. My mouse wrist—the right one—hasn't hurt but, you know, now that I think about it, well, maybe it does hurt just a bit. :-) Actually my left wrist hurts more. What's up with that?

The Logitech Cordless Optical TrackMan looks nice, although I've never used a trackball for any length of time.

3M has an interesting alternative—a joystick. Hmmm, I dunno, though...

I think I'll get one of these touchpads just for fun. I don't mind using the touchpad on my Eee PC. Might be nice to switch back and forth between a mouse and a touchpad during the day.
The HandshoeMouse looks like a ray (you know, the fish). Nice, but it's not a laser.

Here's Microsoft's Natural Wireless Laser Mouse 6000. Not bad. I've had trouble with their scroll wheels in the past, though.

Finally, Logitech's MX 1100 looks real nice. Good reviews, too. I've used their MX Revolution at home for several years and really like it.

UPDATE 12/3/2009: I ended up buying a like-new Logitech MX1100 off of eBay for $20. I like it, although I have been accidentally clicking what are normally the Back and Document Flip ("stealth") buttons with my thumb. After recently losing some text I had just written by accidentally clicking the Back button, I finally got around to disabling these and the Forward button. I never use the Mouse Sensitivity buttons, but they're out of the way so I'll leave them alone. The button below the scroll wheel that switches between scroll speeds works fine, although I miss the automatic clutch in the more expensive MX Revolution. My biggest gripe is with scrolling in click-to-click mode. When you scroll in one direction and then stop, the wheel often rolls back to the previous notch, which moves the mouse back a bit in the opposite direction, which of course scrolls whatever you're looking at back past where you wanted to stop. Just a minor irritation, though. Overall, I like this mouse.

Saturday, November 29, 2008


This is my favorite Calvin and Hobbes cartoon.

Click on the image for a larger, readable size.

Very realistic flame job

Not sure where I stole saw this. To add to the irony, this is permit-only parking—see the sign?

Saturday, November 08, 2008

Vanishing act

One night when I was a teenager, during a break from playing keyboards in a nightclub, I was staring at a brick wall in a hallway much like this:

It had a carriage lamp on it but nothing else. As I stared directly ahead at the wall—but not the lamp—the lamp gradually disappeared so that all I saw was an unadorned brick wall:

I have since been able to do this at will with other scenes. It doesn't work if I stare at the object that I'm trying to erase, and the background has to be uniform, either solid or patterned. I just look at it for a few seconds and the object fades from view. if I alter my gaze, the object comes back.

I know that we all have a blind spot where the optic nerve passes through the back of the eye ball and that our brain compensates by filling in the details based on the scene. Maybe that facility is erasing the lamp. Somehow, I am able to consciously control it. Has anybody else had this happen to them?

Thursday, October 30, 2008

IPv4 Exhaustion Counter

A friend pointed out this site to me. It shows how much longer we have until all IPv4 addresses have been used up. I wanted to add it to my blog, so I made an installer so that others may add it to their blog, too. Look in the right-hand margin for the result.

Monday, October 06, 2008

Cinematic style in photography

Coming across a reference to "cinematic style" in a Twitter entry, I wondered what makes a photograph cinematic.

  • Production

    • Wide aperture
    • Slow shutter (< 1/60 sec)
    • Telephoto lens from a distance on a tripod
    • Slightly underexpose
    • Dusk or dawn

  • Post-production

    • Shift white balance
    • Black bars, top and bottom
    • Reduce saturation
    • Add multicolor noise
    • Curved gamma
    • Increase contrast or make black blacker

The above summary is based on the following citations., the way you move the camera (don't zoom in, be steady, use tripods), film grain, the exposure of the film, and of course depth of field. your depth of field isn't that great on most mini-dv cameras... they're pretty much flat.

White balance to off-white colors for nice tints.

Lock the camera down on a tripod and zoom in from a distance, this gives a nice shallow depth of field with blurry backgrounds much the way a film is shot.

Something I've learned is to get rid of shadow grain. this means toying with the exposure.

You know when yuor filming someone under a light, but everything else is dark, and the camera tries to compensate by adding more light? turn your exposure on the camera down a tad and it will get rid of that.

Another thing to do that is pretty easy is to add a black matte to the top and bottom of the screen. Just two bars of black. I know it's cheesy but it works well when you have no other capabilities such as knocking down the frame rate.

...get a camera with manual focus, exposure, and shutter speed, and set the shutter to 1/60s or slower. Use a tripod.

Avoid shooting at mid-day. Early morning or sunset will look better.

...try to shoot on a long lens as much as possible (put the camera far away from actors, zoom in and film it that way) to create some more depth. Also, shoot on a low F Stop

"How to turn your photo into movie-like effect using Photoshop?"
This is basically what the author says:

  1. Reduce saturation
  2. Increase contrast
  3. Use lens blur to create shallow depth of field
  4. Add Noise
  5. Add black bars top and bottom for Cinemascope effect
  6. Adjust color balance

How do I make my film look digital?
Film cameras normally sample time 24 times a second at 1/48th second each.

Film also tends to record a greater contrast ratio. gamma tends to be more curved (exponential) than video.

Film grain tends to look more multicolored, smaller sized (because film has a greater resolution), ...

...start with basic 3-point lighting.

Use high or low angle shots to convey a character's power in a scene (camera at eyelevel is neutral).

...keep the aperture as open as possible (lower number) and the shutter speed as long a possible (normally 1/60th sec). ... Also, try and work with the camera more zoomed in (but never digitally zoomed in!) and physically farther away from the subject. This flattens the frame and narrows the depth of field (creating a blurry background)–this look is associated with being more cinematic.

Examine something as simple as the color of the walls: In a Hollywood movie, are interior walls ever off-white? No, they are either bright white or a darker, moodier color. This is a micro budget problem because most houses have off-white walls. Off-white works in real life, but looks dirty in a movie.

Desaturate Colors
Some people think reducing the color intensity makes video look more like film.

For whatever reason, video cameras don’t record the dark areas as black as they should (a contrast problem). ... make the blacks blacker ... by reducing the lows or with a filter called “Levels” by increasing the black input.

Blur the Highlights
... The very bright areas of the frame are blurry and almost bleed into the areas directly surrounding them. ... Add a small Gaussian blur ...

Add Grain
... Generate some noise that is colored and randomly changing (under it’s settings). ... Reduce opacity and experiment with composite mode (multiply might be good for this). Keep the opacity low—a little goes a long way.