May 25

Today I made a simple console application using Visual C++ 2008 and it was runs well on my development machine. But the problem occurred when I run the application on another machine, the error says “The system cannot execute the specified program“. I was guessing the problem occurred because of missing library or something, after short analysis both machine have the correct and the same library. So what’s going on??

I googled for this error and found this article, it explains how this problem occurred on compiled C++ application. There’s two type of build on VC++ ( Debug and Release), my application was built in debug mode and we can’t re-distribute the application on debug mode. The built program in debug mode only runs on development machine, so in order to distribute my app I should build my application in ‘Release’ mode. Time to switch from ‘Debug’ to ‘Release’ mode,

Open your Visual Studio->(Open Project)->Project->(project name) properties

select the Build Tab, in configuration option choose “Release”.

Rebuild your project, you will find “Release” folder, your released application is in there.

Tagged with:
May 03

With Powershell we can do FTP transaction really easy. The best feature from Powershell is we can use any dll library in our script, we can import .Net libraries and etc into our script. The script below is simple FTP to upload file to FTP server. In this script I’m using System.Net.WebClient to handle the file transfer.

1
2
3
4
5
6
7
8
9
10
11
$ftpuser = "user"
$ftppass = "12345"
$ftpserver = "localhost"
$file = "C:\test.txt"
$filenewname = "test.txt"
 
$webclient = New-Object System.Net.WebClient
$ftp = "ftp://"+$ftpuser+":"+$ftppass+"@"+$ftpserver+"/"+$filenewname
$uri = New-Object System.Uri($ftp)
 
$webclient.UploadFile($uri,$file)
Tagged with:
May 03

It’s pretty easy to sort an output from ls or Get-ChildItem using powershell, you can sort the output by name, length, and date.

Sort By Name

Get-ChildItem C:\ | sort -property Name

Sort By Size

Get-ChildItem C:\ | sort -property Length

Sort By Date Modified

Get-ChildItem C:\ | sort -property LastWriteTime

You also can reorder the sort output with “-descending”
example :

Get-ChildItem C:\ | sort -property LastWriteTime -descending
Tagged with:
Feb 24

Hello, right now I’m doing development some project using Python for my new company I’m working on. I thought Python will be boring, but Python changes my mind! As programming language Python is really simple and powerful. It can be run cross platform without compile anywhere. It runs well on my Windows and Linux, so I was thinking could I install Python on my Windows Mobile device? The answer is YES! I’m using Windows mobile 6.1 and runs Python perfectly on it. If you want to install Python CE on your windows mobile device, you can get the CAB file in here. It’s free.

Dec 07

Hi there, today I was trying to install IIS on my local computer and I got an error “Setup was unable to open information file setupqry.inf Contact your system admin. The specific error code is 0×2 at line 0“.

This problem occured after I upgrade my Windows XP SP2 to SP3.

The error showed up because some file are missing when system upgraded to SP3. Here’s the list of missing file.


setupqry.inf
optional.inf
msnmsn.inf

setupqry.dll
msgrocm.dll
ocmsn.dll

Paste those inf file to your Windows\inf directory and paste the dll file to windows\system32\setup. It’s fix my problem.

You can download those file here, just extract it to your windows directory.

Tagged with:
Dec 05

Hi there, a few weeks ago I was doing research about auto post from webpage to paypal payment page. The basic idea is the visitor fill the form, then when the visitor submit the form we will store visitor data input to database. Once data stored in database the page will be automatically redirected to paypal website. It’s pretty easy, we will use JavaScript to do auto post. I wanna make this article as simple as possible, I just wanna show how to do auto post with Javascript. Continue reading »

Oct 15

Hi there, I had an error “An Error Has Occurred A project profile was not found” on Zend framework command line when I tried to generate an action for my project. I’m using Windows XP and for the web server I’m using XAMPP. The “An Error Has Occurred A project profile was not found” happened because we have wrong include path in our php.ini.

Open your php.ini and find the include_path line, insert your zend framework library path into the line before the PEAR path.

include_path = ".;E:\xampp\htdocs\ZendFramework\library;E:\xampp\php\PEAR"

Save the file and restart your Apache. Good luck :)

Tagged with:
Jul 26

Hi today I have an experiment with GData in Zend Framework PHP , and found an error that my XAMPP prevent SSL socket transport and return this error.

Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Unable to Connect to ssl://www.google.com:443. Error #24: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?' Continue reading »

Tagged with:
preload preload preload