PROfile
All time reputation: 59
Achievement
jimfred's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
C#
Google Protocol Buffers, usage in C#, using Jon Skeet's protobuf-csharp-port
posted on December 8, 2009 by jimfred
C# saved by 2 people
Trivial JSON example, serialization and deserialization
posted on December 2, 2009 by jimfred
C# usb Interop DeviceIOControl Cypress FX2
C# Cypress EEPROM Utility with interop calls to deviceIoControl for access to USB driver.
posted on November 28, 2009 by jimfred
C# saved by 1 person
Input Box, similar to MessageBox, displays a prompt and accepts a string from the user.
posted on November 20, 2009 by jimfred
C++ mfc
MFC, How to avoid closing of the dialog boxes when ESCAPE key or ENTER key is pressed.
posted on November 8, 2009 by jimfred
C#
c#, resize dialog while maintaining aspect ratio by intercepting the WM_SIZING method in WndProc
posted on October 6, 2009 by jimfred
C#
Render names of C# bitfields using enums and FlagsAttribute. Also, adjusting size of enum using, like ushort, for marshalling p
posted on September 14, 2009 by jimfred
C# saved by 3 people
C#, single-instance-check using mutex. Implements a static function to be called in Program::Main().
posted on September 4, 2009 by jimfred
C# saved by 2 people
C#, Get application name
posted on September 4, 2009 by jimfred
C# saved by 1 person
C# reflection to display a struct's members with their descriptions
posted on August 28, 2009 by jimfred
C# saved by 1 person
Simple enumeration of fields of a struct in C# using reflection
posted on August 28, 2009 by jimfred
SQL
MS Access, SQL JOIN syntax for 3-way table join
posted on August 27, 2009 by jimfred
C++ windows dll mfc saved by 1 person
embed an MFC dialog-based app in a DLL and run using RunDll32
posted on August 24, 2009 by jimfred
C# Reflection endian saved by 3 people
C# structs, byte swapping for conversion from big to little endian using reflection to enumerate members
posted on August 15, 2009 by jimfred
C# saved by 2 people
byte swapping using System.Net.IPAddress.NetworkToHostOrder
posted on August 15, 2009 by jimfred
C# c saved by 2 people
Represent int as hex with leading zeros
posted on August 10, 2009 by jimfred
C# c TypeConverter saved by 1 person
PropertyGrid values in hex/hexadecimal using class derived from TypeConverter
posted on July 30, 2009 by jimfred
C# saved by 1 person
#region/#endregion (or #pragma region/endregion in C++)lets you specify a block of code that you can expand or collapse when usi
posted on July 29, 2009 by jimfred
C# Interop DllImport saved by 2 people
C# calling a DLL API, in this case, MessageBox in user32.dll
posted on July 29, 2009 by jimfred
C++ saved by 1 person
Enumerate NULL delimited strings that are terminated with a double NULL.
posted on July 22, 2009 by jimfred
C++ saved by 1 person
GetCurrentDirectory, MFC
posted on July 22, 2009 by jimfred
C++ scroll mfc CEdit
MFC CEdit append to text log and scroll to the end
posted on July 14, 2009 by jimfred
C++ ts2dll saved by 1 person
TS2GetInfo
posted on July 6, 2009 by jimfred
C Cypress Keil C51
Exercise I/O on OSR USB-FX2 board (Cypress) using Keil compiler
posted on July 5, 2009 by jimfred
C++ saved by 1 person
Simple stopwatch class to measure duration using clock() and CLOCKS_PER_SEC in time.h
posted on May 8, 2009 by jimfred
C++ windows WinBase CreateProcess saved by 1 person
MyExec, calls CreateProcess, waits for completion. WinBase
posted on May 7, 2009 by jimfred
C++ windows WinBase
Get my exe's directory. WinBase API
posted on May 7, 2009 by jimfred
C++ windows WinBase saved by 1 person
Simple non-dot.net function to determine if a file exists. Uses the WinBase API.
posted on May 7, 2009 by jimfred
C++ c mfc CDialog
MFC, resize control in CDialog app
posted on May 2, 2009 by jimfred
C++
CSzEnumerator
posted on April 27, 2009 by jimfred
C++
Get application's full path, MFC, using AfxGetApp()->m_pszExeName, GetModuleHandle and GetModuleFileName
posted on April 17, 2009 by jimfred
C++
MFC, Open File dialog and shellExecute for regsvr32
posted on March 25, 2009 by jimfred
C# dot graphiz saved by 1 person
Graph Visualization and Layout in C# using AT&T's Graphiz and an SVG viewer
posted on March 14, 2009 by jimfred
C# saved by 1 person
.net, console app, convert a bin file to CSV
posted on March 11, 2009 by jimfred
Other interpolation excel extapolation interpolate extrapolate
Interpolation in Excel using =TREND (interpolate)
posted on March 4, 2009 by jimfred
C++
MFC, does file exist.
posted on February 18, 2009 by jimfred
C++
MFC, log to file
posted on February 18, 2009 by jimfred
C++
Add self-uninstall ability to MFC application by calling ShellExecute for MsiExec.exe
posted on February 18, 2009 by jimfred
C++
Get version resource info for a file.
posted on February 18, 2009 by jimfred
C c windows
Get current working directory
posted on February 18, 2009 by jimfred