Skip to content

Instantly share code, notes, and snippets.

@kristopherjohnson
kristopherjohnson / ScalePictures40.vb
Created December 13, 2013 06:02
Microsoft Word macro to resize all pictures in a document to 40% of original size
Sub ScalePictures40()
Dim i As Long
With ActiveDocument
For i = 1 To .InlineShapes.Count
With .InlineShapes(i)
.ScaleHeight = 40
.ScaleWidth = 40
End With
Next i
End With
@mandyedi
mandyedi / gist:f6d860dfc9c43fee3809
Created January 12, 2015 22:42
c++: template: 2d array
// http://stackoverflow.com/questions/8767166/passing-2d-array-to-function/17569578#17569578
#include <iostream>
template <size_t rows, size_t cols>
void process_2d_array_template( int( &array )[rows][cols] )
{
for ( size_t i = 0; i < rows; ++i )
{
std::cout << i << ": ";