Arbitrary HTML and JavaScript injection

Inject arbitrary HTML into this page: Any HTML you want <strong>Any HTML you want</strong> Update Run arbitrary JavaScript on this page: 4 2 + 2 Execute

0

Getting peak meters and volume settings for all apps and audio devices on the system

A few previous posts have touched on how to get peak meter readings on the device, and per-app Getting the package full name of a Windows Store app, given the process ID More on IAudioSessionControl and IAudioSessionControl2, plus: how to log a GUID Getting audio peak meter values for all active audio sessions Linearity of…

5

shellproperty.exe v2: read all properties on a file; set properties of certain non-VT_LPWSTR types

I updated my toy app to set/read shell properties from the command line. New features: Read all the properties from a given file in one go. Recognize properties by their canonical name (if they have one.) Set a property to VT_EMPTY (removing it), or “VT_VECTOR | VT_LPWSTR”, or VT_UI4, in addition to VT_LPWSTR. Usage: >shellproperty.exe…

1

Sample app for RECT functions

Riffing on Raymond Chen’s post today about SubtractRect I threw together a toy app which demonstrates three rectangle functions: UnionRect, IntersectRect, and SubtractRect. Usage: >rects.exerects.exe    union     (left1 top1 right1 bottom1) (left2 top2 right2 bottom2) |    intersect (left1 top1 right1 bottom1) (left2 top2 right2 bottom2) |     subtract  (left1 top1 right1 bottom1) (left2 top2 right2 bottom2) Sample…

0

shellproperty.exe – set/read string properties on a file from the command line

Yesterday Raymond Chen blogged a “Little Program” which could edit audio metadata. As it happens, I have a similar tool I threw together which accepts a property key and a string property value to update a property, or can read a string or string-vector property. Usage: >shellpropertyshellproperty read <key> from <filename>shellproperty set <key> to <string>…

2

Even if someone’s signaling right, they still have the right of way

I was driving to work this morning and I had an experience which vindicated my paranoia, and may even have passed it on to someone else. I was heading East on NE 80th St approaching 140th Ave NE in Redmond. This is a two-way stop; drivers on 140th have the right of way and do not stop….

0

Getting the package full name of a Windows Store app, given the process ID

Last time I talked about enumerating audio sessions and showed an example which listed several Desktop apps and one Windows Store app. Session instance identifier: {0.0.0.00000000}.{125eeed2-3cd2-48cf-aac9-8ae0157564ad}|\Device\HarddiskVolume1\Windows\System32\WWAHost.exe%b{00000000-0000-0000-0000-000000000000}|1%b11812 It’s possible to guess that this is a Windows Store app by the presence of the WWAHost.exe string in the session instance identifier. Don’t rely on this, though; the…

0

More on IAudioSessionControl and IAudioSessionControl2, plus: how to log a GUID

A while back I blogged about using IAudioSessionControl and IAudioSessionControl2 to get a list of active sessions, and then using IAudioMeterInformation to see what the amplitude level of the audio being played from each session was. I decided to go back and push this a little further and see what information there was to dig…

0

Buffer size alignment and the audio period

I got an email from someone today, paraphrased below: Q: When I set the sampling frequency to 48 kHz, and ask Windows what the audio period is, I get exactly 10 milliseconds. When I set it to 44.1 kHz, I get very slightly over 10 milliseconds: 10.1587 milliseconds, to be precise. Why? A: Alignment. A…

2

An attempt to explain the twin prime conjecture to a five-year-old

Back in April, Zhang Yitang came up with a result that is a major step toward proving the twin prime conjecture that there are infinitely many primes p for which p + 2 is also prime. In a reddit.com/r/math thread on the subject, I made the following comment as an attempt to explain the twin prime conjecture to…

1