Solution to missing mkstemp when you are compiling under mingw

I googled around, doesn’t find a perfect solution. But I do come across 2 files on apple website, they actually implement the missing functions while dealing with the code ported to mingw.
http://www.opensource.apple.com/source/Git/Git-17/src/git/compat/mingw.h
http://www.opensource.apple.com/source/Git/Git-17/src/git/compat/mingw.c

For my scenario, I simply created a compiler based branch:
#if defined(__MINGW32__)

int mkstemp(char *template)
{
char *filename = mktemp(template);
if (filename == NULL)
return -1;
return open(filename, O_RDWR | O_CREAT, 0600);
}

#endif

I also downloaded and attached here in case could be useful later: mingw.zip

Easy Screenshot

Easy Screenshot is a tool to help you take screenshot easily. It’s very easy to use, only takes 3 steps: Capture, Crop and Save, that’s it!
download

Screenshot:

easy screenshot

easy screenshot

How to use:

Take the screenshot with quick capture window
Start the application, you will see a “quick capture window” at the bottom right corner of your screen. Click the “Capture” button you will be able to capture the screen.

Take the screenshot with keyboard (shortcut keys)
To capture the full screen, press Prt Scr, and then you will be able to cut the area your want from it.
To capture the active window, press Alt+Prt Scr.

Crop the screenshot from full screen mode
Click Capture button or press Prt Scr on keyboard to get into full screen crop mode.
Use mouse to click and drag a rectangular box around the area your want to crop
Click Crop button or press Enter key to apply the crop process
If you want to save the whole screen, press Ctrl+A in crop mode, and press Crop button
If you are not satisfied with the selected area, do it again to make another selection.

Features:

  • Capture and crop screenshot
  • Keyboard shortcut to capture screenshot: Prt Scr or Alt+Prt Scr
  • Always on top quick capture button to make it easy to capture with mouse
  • Auto rename filename when there is conflict during save
  • Copy screenshot to clipboard
  • Upload screenshot to wordpress with a click of button
  • You can also upload to Media->library or post as a published post directly
  • Save screenshot in png, jpg, gif formats
  • Be able to auto start when system boot

Download below and start to use it now. Also feel free to leave comment below.
download

Easy Screen Recorder

Easy Screen Recorder is a tool to recorder your computer screen activity into video file. You can use it to record your screen and show it to your friends or colleagues.

An easy way to start is do the recording and upload to youtube. And also you can share it on your blog. For the private stuff, send the video over email or with your favorite IM.

This program is very easy to use and totally free. Click the button below to download:
download

The Screen shot of Easy Screen Recorder:

Easy Screen Recorder

Easy Screen Recorder

Features:

  • Record audio with the video
  • Be able to select the source of audio, for example: microphone, mixer of the sound card, multiple sound cards are supported in case you have more than one
  • 3 type of recordings are supported: by selected area, selected window or full screen.
  • Record the video in mp4 or swf format
  • Define the frame rate of recording
  • Specify the folder to save the recorded video
  • A nice timestamped file name will be auto generated for the recorded video

Download now to start use the Easy Screen Recorder, and you are welcome to leave a comment below:
download

programmer’s blog with good stuff and a list of great tools&library

List of programmer’s blog with cool stuff
Some .net related good posts: http://blog.tedd.no/
Graphical programmer: http://stereopsis.com/
Great .net programmer writes excellent codeproject article: http://www.nicolas-dorier.com/

List of platform:
Open slim: http://opensimulator.org/wiki/Main_Page

List of tools:
ilmerge, merge .net dll and exe into one: http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx
windows api monitor: http://www.rohitab.com/apimonitor

List of library:
Take directx and multimedia api to .net: http://slimdx.org/

Others:
synthesia, on screen midi keyboard and even more: http://www.synthesiagame.com/

merge .net dlls into one with ILMerge

If you hate to distribute many .net assemblies, then a tool I have just discovered might be of help: ILMerge, the url is: http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx

But I don’t know a good solution that could do both obfuscation and dll merge. It’s always good to keep the stuff slim but also bug free without headache.

And good to know there is a tool called: apimonitor, http://www.rohitab.com/apimonitor, should to the thing as it’s name indicates which I always want to know about.

Datetime::Now is high precision time

You can get the high precision time with Datetime::Now, instead of with complicated: QueryPerformanceCounter
The test code is:

for (int i=0; i< 20; i++)
{
Console::WriteLine(DateTime::Now.Ticks);
}

And this is the output:
datetime now ticks
It is precise to the 100 nanosecond as you can see from the above image.

Open Simulator

something I don’t have time for, but seems interesting, put it here so I might be able to recall it later:
OpenSimulator is an open-source server platform for hosting virtual worlds.
http://opensimulator.org/wiki/Main_Page

And a programmer’s blog worth reading: http://blog.tedd.no/
And another cool blog on coding related topic: http://stereopsis.com/

a free PAD repository to use

A pad file contains information about a software and pad repository is the inventory of software.

I came across qarchive.org when I was searching for something and see they have a good list of software pad for download, this is the url from where you can find the list: http://www.qarchive.org/repository/. The list is moderated, and have a pretty high reject ratio after a quick look.

I’m always hope that there is a central location for this kind of raw database, but the fact is that many existing sites maintain lists in their own way, either only in their rendered html format or they might have their own rule to accept the files. So can’t say there is a one stop location for this, maybe people only cares about the end product they would use, rather than how it is organized.

To me, the pad system is imperfect. It has redundant information and require author to fill all of them and you have to resubmit for each new product, no way to let it discovery new and auto poll.

Screenshot capture for wordpress

Screenshot capture for wordpress is a tool to take screenshot on your computer and upload to wordpress. The tool is designed with the idea to make the process of publish screenshot to your wordpress blog easier. You can upload to your wordpress with a click of mouse.
It’s also a handy to take screenshot and save on your computer, from there you can do all kinds of interesting thing with it.

download

This is the screenshot:

screenshot capture for wordpress

screenshot capture for wordpress

Quick guide:

Take the screenshot with quick capture window
Start the application, you will see a “quick capture window” at the bottom right corner of your screen. Click the “Capture” button you will be able to capture the screen.

Take the screenshot with keyboard (shortcut keys)
To capture the full screen, press Prt Scr, and then you will be able to cut the area your want from it.
To capture the active window, press Alt+Prt Scr.

Crop the screenshot from full screen mode
Click Capture button or press Prt Scr on keyboard to get into full screen crop mode.
Use mouse to click and drag a rectangular box around the area your want to crop
Click Crop button or press Enter key to apply the crop process
If you want to save the whole screen, press Ctrl+A in crop mode, and press Crop button
If you are not satisfied with the selected area, do it again to make another selection.

Features

  • Capture and crop screenshot
  • Keyboard shortcut to capture screenshot: Prt Scr or Alt+Prt Scr
  • Always on top quick capture button to make it easy to capture with mouse
  • Auto rename filename when there is conflict during save
  • Copy screenshot to clipboard
  • Upload screenshot to wordpress with a click of button
  • You can also upload to Media->library or post as a published post directly
  • Save screenshot in png, jpg, gif formats

download