## June 5, 2015

### Playing WAV Files In PERL

Filed under: Perl,Programming — Brandon @ 3:42 pm
Tags: , , , , ,

I don’t remember why exactly, but a few years ago I wrote a countdown timer that would sound a chime when it reached zero. I decided to keep the code that plays the sound for future reference. Note, this works using ActiveState PERL on Windows.

 use Win32::Sound;

 $wav = 'C:\path\to\file.wav';  Win32::Sound::Play($wav); 

## January 30, 2012

Filed under: How-To,Online Tools,Perl,Programming — Brandon @ 4:08 pm
Tags: , , , , , , , , ,

So, I’d like to have a current traffic map delivered to my e-mail at the precise moment I’m leaving work for the day. Call me lazy, but this is the sort of thing that can be automated pretty easily and I don’t want to go look it up, I want it delivered. Someday, I’ll get around to setting this up, but as they say, a journey begins with a single step. In this case, the step is to find a way a good to download Google Maps with a script. For now, that is the scope of this post.

Here’s some initial research to plow through:
Mapki: Google Map Parameters Best reference so far!
A PERL/Wget solution
A Python script
MapTileCacher in PERL
In Bash

* On 2/7/2012, I tried using the Google Static Maps API and received Error 400 (malformed or illegal request) when using the URL described therein. I have had more luck using Google Maps directly to frame the map, getting the (perma)link, and tweaking the parameters.

## October 7, 2011

### Semaphores

Filed under: Programming — Brandon @ 10:00 am
Tags: , , ,

A semaphore is an abstract data type used to control access to a common resource in a parallel programming environment.

Javaworld Q&A article from 1999
Java Named Semaphores by Mark Nadelson, C/C++ Users Journal
Concurrent Programming Using Java by S. J. Hartley, Drexel University

## March 1, 2010

### The Mark Of The Web

Home > My Lists > Programming Notes > HTML & CSS > The Mark Of The Web

Starting with IE for XP SP2, web pages generated locally (e.g. in a temp directory) do not load properly in Internet Explorer if they include Active Content. This is a result of improved security surrounding the Local Machine Zone. Depending on your operating environment, it may not be possible or desirable to change IE’s security settings; moreover, such changes would have to be applied to all machines accessing local content. The “Mark of the Web” is a better solution.

Microsoft has implemented a new feature called the “Mark of the Web” (or MOTW for short). It is a specially-formated HTML comment that directs IE to open the page in the same security zone as the specified URL. Two valuable examples are:

<!-- saved from url=(0014)about:internet -->

and

<!-- saved from url=(0016)http://localhost -->

Under default security settings, IE is forced to open the page with the former code in the Internet Zone and a page with the latter code in the Local Intranet Zone. The number in parentheses is the number of characters in the URL.

## July 30, 2009

### HTML Special Characters

Filed under: HTML,Programming — Brandon @ 10:43 am
Tags: , , ,

Home > My Lists > Programming Notes > HTML & CSS > HTML Special Characters

I often need the HTML codes for special characters. I’d love to compile a definitive list of my own here, but until I have the time this reference will have to do.

Blog at WordPress.com.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.37625402212142944, "perplexity": 3679.6006381788416}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-34/segments/1502886124563.93/warc/CC-MAIN-20170823210143-20170823230143-00090.warc.gz"}