topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • November 17, 2018, 01:15 AM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - hwtan [ switch to compact view ]

Pages: [1] 2next
1
Developer's Corner / Re: Your First Programming Language vs Now
« on: September 28, 2017, 07:23 AM »
  • What was your first programming language?
BASIC running off the ROM of an IBM PC
  • Can you remember a snippet from that language?

10 PRINT "Hello World"
20 GOTO 10
  • What's your current language of choice?
Whatever gets the job done the quickest.

  • How would you rewrite that snippet in your current language?

while(1) printf("Hello World\n");


2
Developer's Corner / Re: Anyone here do any mobile development?
« on: February 03, 2013, 06:53 AM »
I don't know about you, but what I recall was that iOS / Mac Apps requires a little "paradigm" shift on the developer's part at the beginning.

Objective C and the iOS framework hides the routing of messages and the loading of objects which I noticed confuses developers whom has a strong background in engineering (e.g. if you are used to knowing how control pass over from the event queue / message loop to your code, etc.).

The tool itself was fine for me, especially with the introduction of Xcode 4.


Haven't done much Mobile Apps beside iOS recently, but IIRC, it was less a pain to debugging with XCode than with Eclipse for Android / BlackBerry.

Interesting. Last I used Xcode was a while ago, and it really left a foul taste in my mouth. But they have updated some -- could be worth a look at again. (I was really excited when I got my Mac and pumped up to get busy in Xcode, so I might have had some unrealistic expectations. Probably near about time to give it a shot again.)

3
Developer's Corner / Re: Anyone here do any mobile development?
« on: February 03, 2013, 06:27 AM »
Yes, I have done iOS 5, Android 3.0, BlackBerry 5.0 native apps,  WM5 (.NET Framework) apps, Symbian apps (way back when it runs on Psion 5MX and not Nokia) and PalmOS 5 (if anyone still remembers them).

Haven't done much Mobile Apps beside iOS recently, but IIRC, it was less a pain to debugging with XCode than with Eclipse for Android / BlackBerry.
Less "effortless" was WM5. Most fun was PalmOS (remind me of DOS where you get to hook pretty much anything) and major PIA was Symbian.

4
General Software Discussion / Re: Must-have Windows Programs
« on: December 29, 2009, 11:14 AM »
Glad you like the program, Curt.

Just tested that it works on Windows 2008 Server 64 bit edition, so there's a good chance it might work on Win7 and Vista 64 bit.


As for my must-have Windows Programs :

- Total Commander
- FirstDefence ISR
- ESET Smart Security
- Sandboxie
- Editpad Pro
- SecureCRT
- Visual Studio 2005

(edit 1: add must-have programs, edit 2: added Sandboxie to list of must-have programs)

Yesterday I updated Desktop Icon Toy to version 4, and when I tested it, I saw all the icons on my desktop and was reminded of a small but necessary, well, a must-have program for Windows: deskicons. On 2000 and on XP it was fairly easy to hide the desktop icons, but on Vista it isn't. Except if you have this program. One Run, and they are hidden, one more Run and they will show. The program closes when the job is done.

I don't know if hwtan wrote this program himself, but I have not been able to find deskicons.exe anywhere else, so maybe he did.

:up: _ (see attachment in previous post)

Edited:
I am using it on Vista 32-bits.
[hint] It would be nice to know if it also works on Win 7, and on 64-bits. [/hint]

5
Living Room / Re: Android phone - anyone using it?
« on: March 29, 2009, 10:24 AM »
I'm using the Android Developer Phone (ADP), which replaces my Sony Ericsson M600i. Never use the iPhone, so unable to do a comparision. However, compared to the M600i and WM5 device before that, it has a very nice Webkit-based browser with Javascript support. The Half-VGA screen provides more real estate for display and combined with the trackball which allows you to scroll from part of a page to another both vertically and horizontally, provides a pretty good browsing experience.

The keyboard is pretty good as well once you get used to it. I have my email hosted with google, so the synchronization provided by Android was a plus, though somewhat disappointing because the native gmail apps was kind of restrictive compared to accessing gmail mobile using the webkit browser.

As mentioned by david, there are other bits and pieces that could be improved for a better user experience, but overall, I did rate it pretty awesome as it is.

6
ProcessTamer / Why are there no updates?
« on: February 03, 2009, 05:30 AM »
这个软体非常实用在单核的机器上尤为突出。希望作者能更新。保持活力! China

Non-literal translation: This software is very useful for single core system. I wish that the author would continue to update the software regularly.


7
From my understanding, Rollback Rx stores only the incremental changes, and it stores these changes into "unused"/free space of the drive (not a locked partition). Rollback RX overrides the allocation system and maintain a second hidden allocation table for these changes. This means that other software (e.g. disk defrag, disk imagining) only see the latest OS allocation table and are not safe for use with Rollback RX.

Perhaps due to improper shutdown, etc. I have encountered file system corruption while using Rollback RX. I have since switched to FD-ISR.
 


8
General Software Discussion / Re: Best Python IDE
« on: October 25, 2008, 08:52 PM »
I use WingWare IDE for python. What I liked, which might be available these day in other IDEs, was the the auto-complete even in the Python Shell. Good for trying out short snippets before integrating them into the main code.

9
Official Announcements / Re: September 2008 Giveaway Results
« on: September 30, 2008, 10:28 AM »
Yippe! I've won!!!

Thanks to Carl and DC for the draw :)

10
Comments:

1. Having the words appear one at a time is kind of slow and distracting for me.
2. A better install would be nice... One that doesn't scream 'VB'!
3. Might want to consider upgrading to the .NET framework, personally, I don't like having my PC littered with ActiveX controls.


11
General Software Discussion / Re: Send some info of your PC!
« on: September 06, 2008, 06:08 AM »
Dell M4300
Intel Core 2 Dual T9300 with 4G RAM
Windows XP Professional

12
Living Room / Re: Do you remember your first programming job?
« on: August 18, 2008, 10:41 AM »
First programming job was in high school, maintaining the library record system written in R:BASE.

13
Alternative solution: write to the keyboard buffer.

Code: C++ [Select]
  1. #include <Windows.h>
  2.  
  3. void writeKeyboardBuffer(const char* str)
  4. {
  5.         INPUT in;
  6.  
  7.         in.type = INPUT_KEYBOARD;
  8.         in.ki.dwFlags = 0;
  9.         in.ki.time = 0;
  10.         in.ki.wScan = 0;
  11.         in.ki.dwExtraInfo = 0;
  12.  
  13.         for (const char* ptr = str; *ptr != '\0'; ++ptr)
  14.         {              
  15.                 SHORT key = VkKeyScan(*ptr);
  16.                 if (key & 0x0100)
  17.                 {
  18.                         in.ki.dwFlags = 0;
  19.                         in.ki.wVk = VK_SHIFT;
  20.                         SendInput(1, &in, sizeof(INPUT));      
  21.                 }
  22.  
  23.                 in.ki.dwFlags = 0;
  24.                 in.ki.wVk = key & 0xFF;
  25.                 SendInput(1, &in, sizeof(INPUT));      
  26.  
  27.                 if (key & 0x0100)
  28.                 {
  29.                         in.ki.dwFlags = KEYEVENTF_KEYUP;
  30.                         in.ki.wVk = VK_SHIFT;
  31.                         SendInput(1, &in, sizeof(INPUT));      
  32.                 }
  33.  
  34.                 in.ki.dwFlags = KEYEVENTF_KEYUP;
  35.                 in.ki.wVk = key & 0xFF;
  36.                 SendInput(1, &in, sizeof(INPUT));      
  37.         }
  38. }
  39.  
  40. int main(int argc, char* argv[])
  41. {
  42.         const char* cmd = "cd D:\\TEMP\r";
  43.         writeKeyboardBuffer(cmd);
  44. }

14
Via windows registry:

[ Reference: http://www.kellys-ko...er-xp.com/xp_abc.htm ]

Applications - Restrict Users from Running Specific Applications

This setting allows you to specify applications and filenames that users are restricted from running.

Open your registry and find the key [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion \Policies\Explorer]

Create a new DWORD value and name it "DisallowRun" set the value to "1" to enable application restrictions or "0" to allow all applications to run.

Then create a new sub-key called [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion \Policies\Explorer\DisallowRun] and define the applications the are to be restricted. Creating a new string value for each application, named as consecutive numbers, and setting the value to the filename to be restricted (e.g. "regedit.exe").

Explained: DK

Right click in the right pane and select New, DWord value.  Name the new value DisallowRun.  Double click the new value and set it to 1.  Then right click on the Explorer sub branch, in the left pane and select New, Key  Name the new key Disallow Run.  Highlight this key, then in the right pane, right click and select New, String value.  Give it "1" for
the name, without the quotes. 

Double click this new value and enter the actual file name of the executable you wish to restrict this user from
running.  Example: calc.exe   This prevents this user from running Calculator.  They'll get a "This operation has been cancelled message" when they try.  Note: The way around this is for the user to rename Calc.exe to something else.  For additional entries, just give the "values" names in numerical order, 1, 2, 3, 4 and so on. DisallowRunReg and DisallowRunCalc

Restart Windows for the changes to take effect.

Applications - Restrict Applications Users Can Run

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer. Value Name: RestrictRun

Open your registry and find the key [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion \Policies\Explorer]

Create a new DWORD value and name it "RestrictRun" set the value to "1" to enable application restrictions or "0" to allow all applications to run.

Then create a new sub-key called [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion \Policies\Explorer\RestrictRun] and define the applications that are allowed. Creating a new string value for each application, named as consecutive numbers, and setting the value to the filename to be allowed (e.g. "regedit.exe" and "calc.exe").

Explained: DK

This example prevents any applications but those that you specify from being run:

Right click in the Right pane and select New, DWord value and name the new value RestrictRun  Double click this entry
and set it to 1. Right click on the Explorer sub branch, in the left pane and select New, Key  Name the new key RestrictRun.  Highlight this key, then in the right pane, right click and select New, String value.  Give it "1" for the name, without the quotes.  Double click this new value and enter the actual file name of the executable you wish to restrict this user from running. Example: calc.exe  Right click again, select New, String value, name the new value "2".  Double click the new
value, enter REGEDIT.EXE

This example would only allow Calculator and REGEDIT to be run.   Be VERY careful with this setting.  You could wind up locking yourself out of REGEDIT if you were to use the restrictions on your Administrator account.

Restart Windows for the changes to take effect.

Note: If you are the person who applies Group Policy, do not apply this policy to yourself. If applied too broadly, this policy can prevent administrators from running Group Policy or the registry editors. As a result, once applied, you cannot change this policy except by reinstalling Windows XP.

Software Restriction Policies may be set to determine what software may or may not be run by users on the system. (Jim Cavalaris [MS])

Software Restriction Policies can be configured via the group policy editor (gpedit.msc) at:

Local Computer Policy -->Computer Configuration -->Windows Settings -->Security Settings -->Software Restriction Policies.  Policy can be set to either: restrict users from running specified programs - OR -restrict users to allow ONLY the specified programs to be run.

For a non-domain machine, policy can be applied to all users on the system, or non-Admin users only (Admins are not affected by the policy, and may run any/all programs). you cannot specify this policy for only certain users, but for a non-domain machine, the Admin/non-Admin breakdown may be sufficient.

15
Surely, the most used application for me would be a web browser (IE8, in my case) and some background applications (NOD32, Jetico Firewall, TrueCrypt). But other than these, the applications that I use most are:

Total Commander
Visual Studio .NET 2003
WingIDE
UltraEdit
PuTTY


16
Living Room / Re: Keeping track of software license/serial keys
« on: November 17, 2007, 10:10 PM »
I keep two copies, one in a text file in an volume encrypted by TrueCrypt on the HDD, and another in my phone.
I chose text file so that i can open it with minimum software needs when I reinstall windows.

17
Living Room / Re: Laptop or Desktop — which are you?
« on: November 17, 2007, 10:07 PM »
I use a laptop mostly. Three reasons:

1. It saves the trouble of having to move data.
2. You can use it any where you want, on the train, etc.
3. It's more powerful than my company-assigned desktop.

The only thing I missed is the ability to use certain add on cards (e.g. PCI-X)


18
Developer's Corner / Re: Implementing VoIP to a simple program...
« on: November 14, 2007, 07:39 AM »
What you probably means is to implement transmission of voice packet using ip packets, not VoIP which covers more than just that (SIP and all).

Basically, you will need some way to capture digitialized packets from the sound device and some way to regenerate received packets on the sound device. May be you might want to read up on DirectX (DirectSound). There is a project on CodeProject on this (http://www.codeproje...net/VoIP_For_You.asp). For the network packet, the challenge is in the data compression and how to optimising/adjust the buffer size such that you are able to tolerate some form of jitter in the receive rate and yet acceptable latency over different network due to their bandwidth and latency characteristics.


19
I guess the problem would be to find the function.
Below is a program that encodes a number using power tables.
For some data value, you will find that in order to represent it, you would need more storage than its original form.

Code: Python [Select]
  1. class CompressionTable:
  2.     values = {}
  3.    
  4.     def __init__(self):
  5.         for b in xrange(2, 9):
  6.             CompressionTable.values[b] = [ b, b**2, b**3, b**4, b**5, b**6, b**7, b**8 ]
  7.            
  8.    
  9.     def to_func(x):
  10.         v = x
  11.         while  v > 1:
  12.             lc = 0
  13.             lb = 0
  14.             ld = v
  15.             part_found = False
  16.             for b in xrange(2, 9):
  17.                 for c in xrange(8):
  18.                     d = v - CompressionTable.values[b][c]
  19.                     if abs(d) < abs(ld):
  20.                         lb = b
  21.                         lc = c
  22.                         ld = d
  23.            
  24.             print "%d^%d -> %d" % (lb, lc+1, ld)
  25.             v = abs(ld)
  26.            
  27.         print "final value of v = %d" % v
  28.    
  29.     to_func = staticmethod(to_func)
  30.  
  31. t = CompressionTable()
  32.  
  33. while True:    
  34.     v = long(raw_input())
  35.     if v == 0:
  36.         break
  37.     t.to_func(v)
  38.  
  39. print "-End-"
257
2^8 -> 1
final value of v = 1
258
2^8 -> 2
2^1 -> 0
final value of v = 0
9999
6^5 -> 2223
3^7 -> 36
6^2 -> 0
final value of v = 0
16384
4^7 -> 0
final value of v = 0
987654
7^7 -> 164111
7^6 -> 46462
6^6 -> -194
6^3 -> -22
5^2 -> -3
3^1 -> 0
final value of v = 0
9876543
7^8 -> 4111742
7^8 -> -1653059
6^8 -> -26557
8^5 -> -6211
3^8 -> -350
7^3 -> 7
7^1 -> 0
final value of v = 0
16777216
8^8 -> 0
final value of v = 0
16777219
8^8 -> 3
3^1 -> 0
final value of v = 0
1677719
6^8 -> -1897
3^7 -> -290
2^8 -> 34
2^5 -> 2
2^1 -> 0
final value of v = 0

20
If I understand you correct, the answer is, it can.
See http://en.wikipedia..../wiki/Huffman_coding . If I'm not mistaken, ZIP contain something similar to Huffman.

You may also want to read up on http://www.data-comp...sion.com/theory.html about data entropy and compression.



21
Well.. Last time I tried, everything went through expect at the last step where I was told that they were unable to process my order.

22
Adobe does not take orders from Singapore. Your best bet is to buy from a physical store, e.g. Challenger or some other shops in Funan. Prices, are cheaper then US when I bought Adobe Photoshop Element.

If you really wants to make the purchase online, may be you can contact http://www.softwareexchange.com.sg/ .


23
Post New Requests Here / Re: IDEA: Porting VeloAce to the PC
« on: May 21, 2007, 06:24 AM »
Porting of Palm App to Windows is non-trivial. I would suggest a complete rewrite of the program in .NET or MFC, which could be potentially faster.
Attached is  a simple .NET 2.0 tester program for the hardware interface which calculates the RPM.
Please let me know if it works with the Vaif hardware.

24
Post New Requests Here / Re: IDEA: Staff rotation tool
« on: May 19, 2007, 11:56 AM »
I wrote something rough based on your pdf. It is available here:

http://hwt.dcmembers...taffRot/StaffRot.msi (MSI setup), or
http://hwt.dcmembers...taffRot/StaffRot.zip (ZIPped binaries, requires .NET Framework 2.0)

Source code, release under GPL 2.0 License is available here:
http://hwt.dcmembers...fRot/StaffRotSrc.zip


25
Post New Requests Here / Re: IDEA: Graphic Countdown with Random Reset
« on: February 12, 2007, 11:07 PM »
You can find the program at http://dcmembers.com...ntDown/CountDown.rar
Source code is available at http://dcmembers.com...own/CountDownSrc.rar

To customize the LEDs, please edit the LED?.gif files in the images directory.  A photoshop image (LED.psd) is included.
To go to full-screen mode, please double-clicked on the digits.



Pages: [1] 2next