Sunday, June 15, 2008
New Plan – UML TOOL
The idea was this. The program will be a command base program where it wouldn’t accept any mouse input. There will be a main screen locate at top of the window which is going to renders the object on the screen. This screen will gonna occupied 90% of the window. Whereas at the bottom of the screen will be a place for me to type the command. And those commands will instruct how the object should be render in main screen.
The estimate time for this project will be 12 days. 1st draft for this project is to have some rectangle drawing on the screen and some line that link them together. Beside that there will be some AI for the line where it will change direction if there are some rectangles blocking the line in between the link. Cool huh?
In this week, I have done some research study on the GDI+ and I feel OK with it. Next week will start to working on the 1st draft.
Saturday, June 7, 2008
Alternate Solution To My Search Program
Usage:
find
eg:
find C:\Test >> test.txt
Output:
c:\test
c:\test\a.txt
c:\test\b.cpp
Disadvantage:
print out unwanted directory name, like c:\test.
Conclusion:
Need to figure it out how can I make a filter on the unwanted 'thing'.
Sunday, May 18, 2008
Trick to track the argument in console
FEATURE LIST:
- Search path. This feature allows dynamically to search the desired path
- List. This is to show out the search result.
- Output. Export search result to text file.
The first two already done. Third feature still in progress.
During this experience project, I found a very interesting issue. How to track the input passing in through the command line? Lets take a look:
void main(int argc, char *argv[], char *envp[])
Initially I was using argc to track how many command was passing in. This is not really a good method of doing this because when passing in more and more options, it duplicate the same task. Refer to the code below:
switch(argc)
{
case 1: // no option was pass in
break;
case 2: // 1st option was pass in
break;
case 3: // 1st and 2nd option was pass in
break;
...
...
case n: // until n number of option was pass in
break;
}
Anyhow I have overcome this issue by tracking down the number of command passing in by using the argv pointer array. If argv[1] is empty, definitely I know that option number 1 is not there. Otherwise there must be an option passing in. For doing that, I just need a while loop to track every element in argv. But how do I know how many option was passing in? By using NULL checker? Actually I was using argc to get the total element in argv. I get this inspiration from MSDN.
Sunday, May 4, 2008
My first day in C++ .Net.
The first application that adopts this technology is my search file console program. The objective of this program is to retrieve all the files by searching through the particular location (including the remote media and network media).
This is not an error I guess, it just unable to retrieve the debug information. I do not know how to solve this problem, if you read this post and have any suggestion on this, do let me know. Thus I have to recreate the project by choosing “Win32 Console Application” under the Win32 category.
Now, the primary keys to deal with Files are DirectoryInfo, FileSystemInfo, and FileAttributes. The sample below will show all the files (not directory) in C drive.
DirectoryInfo ^di = gcnew DirectoryInfo("C:\\");
for each(FileSystemInfo ^fsi in di->GetFileSystemInfos())
{
if(fsi->Attributes != FileAttributes::Directory)
{
Console::WriteLine(fsi->Name);
}
}
Sunday, September 23, 2007
My modem is working now
An error message prompt timeout expired while waiting for the PPP interface to come up. This is so annoying for me to click on the OK button every time I connect to the Internet. This is annoying too every time I need to configure my modem after Linux was bootup.
Things going to solve soon. I need some configuration setting to make my modem “permanently” stay in my Linux.
Sunday, September 16, 2007
Tools to detect my modem
This tool can help you to detect your modem device, the files needed to compile your modem and many more. It was a very good tool. To use it, follow this simple steps:
gunzip Scanmodem.gz
chmod U+X Scanmodem
./scanModem- gentoo-wiki.com/HOWTO_slmodem
This will create a ModemData.txt under a Modem directory (there are many more files generated). So I open up the file and I see a lot of info which I couldn’t understand. The very interesting part to me is this:
PCI ID: 2000:2800
Subsystem ID: 122d:2800
…
…
Candidate modem in PCI bus: 00:0c.0
Class 0703: 200:2800
Primary PCI_id: 2000:2800
Type needed: slamr
After reading this, so called spec, I become blur and struggle. It seems helpless on Internet after a few weeks of searching and googling. The only hope is to go back read carefully the README from the package. This is the only hope I think.
One thing for sure is my modem chipset is SL2800.
Saturday, September 15, 2007
First try on installing a modem on Mandriva 2007
I am surprising that I am able to see the driver source code after I have extract the zip file. (I am new to the Linux world.) There is no exe file. I go through the instruction from the README file and following every step to in the setup process. It gives me an error. This is so interesting that the console showing which line is having trouble in which file. Just like a debugger. I follow what have been told by the compiler to see what is inside the code.
Open it. I have no idea on how to fix the code although I am a C++ developer. (Frankly my core skills are UI only.) This is so funny that I can read the C++ code but I have no idea on how this code is work. I put this aside for a few weeks until I manage to find a latest driver. I get the package from here.
It compiled and installed but I have no way to configure it. Did some Google search and I got this thread. This thread did mention about on how to setting up and configuring the modem. It works exactly. Unfortunately the modem is not able to query. Is it my false?
