Wednesday, June 29, 2005

Filesystems HOWTO

Tuesday, June 28, 2005

Gdk-WARNING **: locale not supported by Xlib, locale set to C


then sa commandline, i set the following

LANG=C

then gumana na yung winetools

Monday, June 27, 2005

Slashdot | Windows Users Ignoring LUA Security

Slashdot | Windows Users Ignoring LUA Security: "Try something next time...

Change the shortcut to point to 'runas /u Administator /p (the admin password) /e (the path to the exe) /a (whatever the arguments are)'. That should let you run something as an Admin while still being an LU."

Slashdot | Windows Users Ignoring LUA Security

Slashdot | Windows Users Ignoring LUA Security:

You can start a Administrator cmd prompt in windows without logging off:

runas /profile /user:Administrator cmd.exe

Or any other program can be launched.

Slashdot | Windows Users Ignoring LUA Security

Slashdot | Windows Users Ignoring LUA Security:

"Running windows without admin rights is a nightmare."

It certainly isn't easy, unless you're willing to invest significant technical time and effort into the project -- which is, I'm sure, a big part of the reason why most people don't do it.

That being said, I'm the admin for an organization with about 60 or so Windoze stations, and I can say that it can be done for most things. It most often involves figuring out what the defective program is trying to do, and then allowing it access to just where it needs.

The two most vital tools are FileMon and RegMon, both free from SysInternals (http://www.sysinternals.com/ [sysinternals.com]). They monitor file system or registry accesses. In the vast majority of programs can be made to work just by applying some ACLs on program-specific registry or filesystem branches.

There's no way in hell your 'typical home user' could do this, though, which is, I expect, the problem and point.

Sunday, June 26, 2005

Installing Java on Linux

Add deb [WWW] ftp://ftp.tux.org/java/debian/ sarge non-free

' mib...
mas tama yata to, kesa yung ftp.tux..

command line way
add the following to /etc/apt/sources.list

deb http://archive.ubuntu.com/ubuntu/ hoary universe main restricted multiverse

Gui way

1. System > Administration > synaptics package manager
2. Settings > Repositories > click Add > click both Community Maintained (universe) and Non Free Multi Verse

' ...mib

to /etc/apt/sources.list

and then do

' mib...
' hindi ko iinstall 1.4. yung latest 1.5 n lng iinstall ko
apt-get install j2re1.4 java-common

' instead i download jdk 1.5, look in http://java.sun.com/
jdk-1_5_0_04-nb-4_1-linux.bin
' ...mib

a complete description for newbies is here:

[WWW]


Download Sun's JDK (.bin format) from [WWW] http://java.sun.com/j2se/1.5.0/download.jsp. Choose either the JDK or JRE link. Execute these commands (assuming you downloaded the file 'jdk-1_5_0_02-linux-i586.bin'):


% sudo apt-get install java-package fakeroot
% fakeroot make-jpkg jdk-1_5_0_04-nb-4_1-linux.bin
% sudo dpkg -i sun-j2sdk1.5_1.5.0+update02_i386.deb

' mib...
' however instead of following those above 3 instruction.
' i skip in creating a debian package, as i really have a hard time, figuring out
' how to resolve the following(when issuing a fakeroot make-jpkg.. instruction):

' Loading plugins: blackdown-j2re.sh blackdown-j2sdk.sh common.sh ibm-j2re.sh ibm-j2sdk.sh j2re.sh j2sdk.sh j2se.sh sun-j2re.sh sun-j2sdk.sh

' i just proceed with the following
' chmod 755 jdk-1_5_0_04-nb-4_1-linux.bin
' ./jdk-1_5_0_04-nb-4_1-linux.bin'
' chmod 544 jdk-1_5_0_04-nb-4_1-linux.bin

installation:

% java -version
java version "1.5.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09)
Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode, sharing)

The "/java-web-start.applications: Permission denied" messages can be ignored when building the package. The above also works with jdk-1_5_0_03-linux-i586.bin under Hoary. -- rcs 07-May-2005

If you have "No matching plugin was found." problem on Breezy, have a look at [WWW] http://www.ubuntuforums.org/showpost.php?p=212313&postcount=2 (marcin, June-2005)

ubuntu in vmware

I fixed the problem via this way:

http://ubuntuforums.org/archive/index.php/t-25258.html



You need to install the headers for the release of the kernel you have installed. To find this out you can type

>> uname -r

to get the header you can apt-get install them,

>> sudo apt-get install linux-headers-`uname -r`

or select the appropriate package in synaptic.

Note: you'll also need gcc etc which if you don't have already you can get with

>> sudo apt-get install build-essential

After installation the vmware installer should just pick up the right place and not require anything but the defaults.

If it's still being stupid, the path to include can be found in /lib/modules/<>/build/include

Cheers.

[Users] Stopping X From restarting itself

[Users] Stopping X From restarting itself:

On Wed, 2003-07-09 at 14:08, Dan Varga wrote:
> Hi, im trying to install the NVIDIA video card drivers and it doesnt
> like X to be running i ctrl+alt+F2 into a new space login and go to kill
> X and it kills it then brings itself back up. Im running Ximain Desktop
> 2 and RedHat9


Instead of killing X, just 'init 3'. When you are done installing the
driver, use 'init 5'.

Linux Display Driver - IA32

Linux Display Driver - IA32


sh NVIDIA-Linux-x86-1.0-7667-pkg1.run

dati ganito installation ng nvidia

./NVIDIA-Linux-x86-1.0-7667-pkg1.run

i wonder kung para saan yung sh

then tiningnan ko yung file permission

-rw-r--r--

then i try: chmod 755

this then runs:

./NVIDIA-Linux-x86-1.0-7667-pkg1.run

Debian Rarewares

Vim Keys

Vim Keys

0. Introduction
Why should you bother to learn Vim? Because you will be using it during your Practical Exam as File Transfers will be disabled during the Practical Exam. Also it is a powerful editor at the hands of a skilled programmer.

You do not need to memorize all these commands. You may print it out if you wish and use it as a reference sheet. Put it beside you when doing your programming. You will eventually find that you will use the reference sheet less and less. Practice makes better!

1. Vim Keys
When you startup Vim, you are in Command Mode. Normally, we press the "i" key to go into Insert Mode. You can type your C program only when you are in Insert Mode.

Note that as usual, Vim is case-sensitive, i.e. "i" is different from "I". When typing "I", you should type "Shift-I".

1.1 Going from Command Mode to Insert Mode
There are many ways to go from Command Mode to Insert Mode:

i Insert text before the cursor.
I Insert text before the first non-blank in the line.
o Begin a new line below the cursor and insert text.
O Begin a new line above the cursor and insert text.
a Append text after the cursor.
A Append text at the end of the line.
R Enter Replace mode: Each character you type replaces an existing
character, starting with the character under the cursor.

1.2 Going from Insert Mode to Command Mode
This is easy. Simply press the key.

1.3 Useful commands while typing in Insert Mode

Toggle between Insert and Replace mode.
CTRL-N Search forward for next matching keyword. This keyword
replaces the previous matching keyword.
CTRL-P Search backwards for next matching keyword. This keyword
replaces the previous matching keyword.
CTRL-W Delete the word before the cursor.
CTRL-U Delete all entered characters in the current line.
CTRL-E Insert the character which is below the cursor.
CTRL-Y Insert the character which is above the cursor.

2. Command Mode Commands
2.1 Visual Mode

v Start Visual mode per character.
V Start Visual mode linewise.

When in Visual mode, use the arrow keys to move around to select your text (which is highlighted). Then choose one of the following actions:

y Yank (Copy) text.
d Delete (Cut) text.
c Delete (Cut) text and starts insert mode.
~ Switch case of highlighted text.
u Make highlighted text lowercase.
U Make highlighted text uppercase.

If you have used Copy or Cut, you may use "p" or "P" to Paste your text as follows:

p Put (Paste) the text after the cursor.
P Put (Paste) the text before the cursor.

2.2 Motion (Moving Around)

0 To the first character of the line.
^ To the first non-blank character of the line.
$ To the end of the line.
w One word forward.
e Forward to the end of word.
b One word backward.
( One sentence forward.
) One sentence backward.
{ One paragraph forward.
} One paragraph backward.
H To line at top of screen.
M To Middle line of screen.
L To line at bottom of screen.
CTRL-F Scroll window one page forward.
CTRL-B Scroll window one page backwards.
CTRL-E Scroll window one line downwards.
CTRL-Y Scroll window one line upwards.
f{char} To 1st occurrence of {char} to the right. The cursor is placed
on {char}. E.g. "fg" moves the cursor to the 1st occurrence of
the character "g" to the right.
F{char} To 1st occurrence of {char} to the left. The cursor is placed
on {char}.
t{char} Till before 1st occurrence of {char} to the right. The cursor
is placed on the character left of {char}.
T{char} Till before 1st occurrence of {char} to the left. The cursor
is placed on the character right of {char}.
gg Goto the first line in the file, on the first non-blank
character.
G Goto the last line in the file, on the first non-blank
character.
{count}G Goto line {count} in the file, on the first non-blank
character. E.g. "25G" goes to line 25. You may also go
straight to line 25 from the Unix command prompt by typing:
"vim +25 myfile.c"
% Find the next item in this line after or under the cursor and
jump to its match. Items can be:
([{}]) parenthesis or (curly/square) brackets
/* */ start or end of C-style comment
This is very useful to locate that missing closing ), }, ],
or */.

2.3 Changing Text
All commands that start with ":" must end with "".

r{char} Replace the character under the cursor with {char}.
y{motion} Yank (Copy) text that {motion} moves over. E.g. "yw" copies
one word.
yy Yank (Copy) one line.
Y Yank (Copy) one line.
d{motion} Delete (Cut) text that {motion} moves over. E.g. "dw"
deletes one word. Another e.g. "dfn" deletes from the cursor
to the first occurrence of "n" on the right (including the
"n") in the line.
dd Delete (Cut) one line.
D Delete (Cut) the characters under the cursor until the end
of the line. Synonym for "d$".
c{motion} Delete text that {motion} moves over and starts insert mode.
E.g. "cw" deletes one word forward and starts insert mode.
cc Delete one line and starts insert mode.
C Delete the characters under the cursor until the end of the
line and starts insert mode. Synonym for "c$".
s Delete one character under the cursor and starts insert
mode.
S Delete one line and starts insert mode.
x Delete (Cut) one character under the cursor.
X Delete (Cut) one character before the cursor.
~ Switch case of the character under the cursor and move the
cursor to the right.
g~~ Switch case of the entire current line.
guu Make the entire current line lowercase.
gUU Make the entire current line uppercase.
J Join the current line with the next line.
:r [name] Insert the file [name] below the cursor. E.g. ":r sample.c"
inserts the contents of the file "sample.c" below the
cursor.

If you have used Copy or Cut, you may use "p" or "P" to Paste your text as follows:

p Put (Paste) the text after the cursor.
P Put (Paste) the text before the cursor.

Here are some useful key combinations:

xp Exchange the order of two characters.
ddp Exchange the order of two lines.
deep Exchange the order of two words. The cursor must be placed in the
blank space before the first word.

2.4 Repeating and Undoing Changes

. Repeat last change.
u Undo last change.
CTRL-R Redo last change which was undone.

2.5 Doing Commands Multiple Times
Most commands above can be prefixed with a number to indicated the number of times to do the command. As you type the command, you should see the command appear at the bottom right hand corner of your screen. Here are some examples:

10dd Delete (Cut) ten lines.
5yy Yank (Copy) five lines.
72i* Insert "*" 72 times.
3fg Moves the cursor to the 3rd occurrence of the character "g"
to the right.

2.6 Marks
These commands are useful for jumping around quickly in your C program. You may set a mark at a certain position in your C program, then quickly jump back to it later.

m{a-zA-Z} Set mark {a-zA-Z} at the current cursor position. It does
not move the cursor, this is not a motion command. E.g. "md"
sets mark "d" at the current cursor position. Since Vim is
case sensitive, the mark "d" is different from the mark "D".
`{a-zA-Z} Jump to the mark {a-zA-Z}. E.g. "`d" jumps to mark "d". Note
that "`" is the backtick key, it is usually found on the top
left hand portion of your keyboard.
`` Jump to the position before the last jump, or where the last
"m" command was given (where the last mark was set).

2.7 Searching
All commands that start with "/" or "?" must end with "".

/{pattern} Search forward for the 1st occurrence of {pattern}. E.g.
"/abc" searches forward for the 1st occurrence of the text
"abc".
?{pattern} Search backward for the 1st occurrence of {pattern}.
n Repeat the latest "/" or "?" search.
N Repeat the latest "/" or "?" search in the opposite
direction.
* Search forward for the 1st occurrence of the word under /
nearest to the cursor.
# Search backward for the 1st occurrence of the word under /
nearest to the cursor.

2.8 Find and Replace
All commands that start with ":" must end with "".

:%s/{pattern}/{string} Search the whole file and replace
a match of {pattern} with {string}. Only the
first occurrence of {pattern} in each line is
replaced with {string}. E.g. "%s/abc/defg"

:%s/{pattern}/{string}/g Search the whole file and replace
a match of {pattern} with {string}. All
occurrences of {pattern} in each line is
replaced with {string}. E.g. "%s/abc/defg/g"

:%s/{pattern}/{string}/gc Search the whole file and replace
a match of {pattern} with {string}. All
occurrences of {pattern} in each line is
replaced with {string}. Each substitution is
confirmed with a prompt. E.g. "%s/abc/defg/gc"

2.9 Saving and Quitting
All commands that start with ":" must end with "".

:w Write (save) the current file.
:wq Write (save) the current file and quit Vim.
:x Like ":wq", but write only when changes have been made.
ZZ Write current file, if modified, and quit Vim (same as ":x").
:q Quit Vim.
:q! Quit Vim without writing (saving).

LinuxQuestions.org - Mepis vs Ubuntu/Kubuntu - where Linux users come for help: "Today is the tomorrow that you worried about yesterday"

Ubuntu Mini-RAM HOWTO: "apt-get install acroread

"

Saturday, June 25, 2005

Ubuntu Forums - Network with XP

Ubuntu Forums - Network with XP:

You have two computers,
Computer A:
Ubuntu with 2 Eth Cards
Eth0 Connect to your ADSL modem
Eth1 Connect to your B computer

Computer B: Windows XP

Computer A Steps:
1-) Computer -> system configuration -> Networking
2-) Select Eth1 properties
IP Address: 192.168.1.100
Subnet mast: 255.255.255.0
Gateway: 10.0.0.138 Assuming its your ADSL modem IP
Press Ok, Do not activate it yet.

Now Computer B Steps:
Start -> control panel -> networks
Internet protocol (TCP/IP) -> properties
Tick use the following IP address
IP Address: 192.168.1.101
Subnet mast: 255.255.255.0
Default gateway: 192.168.1.100
Preferred DNS server: 10.0.0.138 which is your ADSL modem IP address in our example

I'm not sure but you may have to reboot WINDOWS XP couple of times to get it working preperly.

now you are done, in case it didn't work
Try to ping A from B and B from A
Try to ping your Modem IP address from B
Try to stop your firewall while setting it up & troubleShooting
I had problem with setting up Firestarter after setting up the network, so I had to remove it "COMPLETE REMOVAL" then re-apt it, and it auto configured itself.

in computer A type
sudo iptables -t nat -L
sudo cat /proc/sys/net/ipv4/ip_forward (1 enabled )

Slashdot | Mark Shuttleworth Answers At Length

Slashdot | Mark Shuttleworth Answers At Length:

"I get tons of people stopping me in the street in Cape Town again, but instead of asking 'what's weightlessness like' they want to know about Open Source. The answer to both questions? 'Liberating' :-)

Was it worth it?
by jmichaelg (148257)

Two questions:

1) Asking you 'was it worth it?' is going to get an affirmative answer regardless of how you really feel so let me ask you, what happened on the flight that made the trip worth $20 million?

2) How much would you pay to go up a second time?
MS: I don't know how much space and spaceflight interest you, but for me they've always been areas of great fascination and imagination. Even if you're a believer in reincarnation you have to admit that it makes sense to make the most of this life, and for me that means tackling the biggest and scariest and most audacious projects I can.

"

FedoraForum.org - traceroute linux vs. tracert Windows

Looks like yet again we've answered our own question

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/tracert.mspx

This web site indicates that Microsoft's tracert uses ICMP packets, while by default traceroute uses UDP packets. Using traceroute with -I mimics the windows behavior, and in our case solves the problem. It appears the firewall/router we use to handle the VPN connection blocks some UDP traffic, but not the required ICMP packets. Never a dull moment!
Reply With Quote

Appendix A - The Tanenbaum-Torvalds Debate

"There are two kinds of researchers: those that have implemented something and those that have not. The latter will tell you that there are 142 ways of doing things and that there isn't consensus on which is best. The former will simply tell you that 141 of them don't work"

Re: Simple question - opening a port

Re: Simple question - opening a port:


% Hi. I have debian 3.0 running ipmasq and iptables. It's a firewall
% for a home network. I want to host a game over the net. All I think
% I need to do is open a port for this. I don't quite know how to do
% that! Anyone have a pointer to a simple faq for this (or could just
% tell me!)
%
---akhir kutipan---

I have an experience today, opening port 80/www for one of my
inside-firewal machine. All I have to do is:

# iptables -t nat -A PREROUTING -i eth0 -p tcp
-d xxx.xxx.xxx.176 --dport www -j DNAT
--to 192.168.1.3:80

# iptables -A FORWARD -i eth0 -o eth1 -p tcp -d 192.168.1.3
--dport 80 -j ACCEPT

# iptables -A INPUT -i eth0 -m state --state
NEW,ESTABLISHED,RELATED -p tcp --dport www -j ACCEPT


note: xxx.*.176 is my ADSL-given IP (public).

The first two command is explained in
http://www.knowplace.org/netfilter/syntax.html#conf2
for port forwarding.

The lattest command is provided by G Wheelbarger in previous
message for opening the port.

Re: Simple question - opening a port

Re: Simple question - opening a port:


% Hi. I have debian 3.0 running ipmasq and iptables. It's a firewall
% for a home network. I want to host a game over the net. All I think
% I need to do is open a port for this. I don't quite know how to do
% that! Anyone have a pointer to a simple faq for this (or could just
% tell me!)
%
---akhir kutipan---

I have an experience today, opening port 80/www for one of my
inside-firewal machine. All I have to do is:

# iptables -t nat -A PREROUTING -i eth0 -p tcp
-d xxx.xxx.xxx.176 --dport www -j DNAT
--to 192.168.1.3:80

# iptables -A FORWARD -i eth0 -o eth1 -p tcp -d 192.168.1.3
--dport 80 -j ACCEPT

# iptables -A INPUT -i eth0 -m state --state
NEW,ESTABLISHED,RELATED -p tcp --dport www -j ACCEPT


note: xxx.*.176 is my ADSL-given IP (public).

The first two command is explained in
http://www.knowplace.org/netfilter/syntax.html#conf2
for port forwarding.

The lattest command is provided by G Wheelbarger in previous
message for opening the port.

Re: Simple question - opening a port

Re: Simple question - opening a port:


% Hi. I have debian 3.0 running ipmasq and iptables. It's a firewall
% for a home network. I want to host a game over the net. All I think
% I need to do is open a port for this. I don't quite know how to do
% that! Anyone have a pointer to a simple faq for this (or could just
% tell me!)
%
---akhir kutipan---

I have an experience today, opening port 80/www for one of my
inside-firewal machine. All I have to do is:

# iptables -t nat -A PREROUTING -i eth0 -p tcp
-d xxx.xxx.xxx.176 --dport www -j DNAT
--to 192.168.1.3:80

# iptables -A FORWARD -i eth0 -o eth1 -p tcp -d 192.168.1.3
--dport 80 -j ACCEPT

# iptables -A INPUT -i eth0 -m state --state
NEW,ESTABLISHED,RELATED -p tcp --dport www -j ACCEPT


note: xxx.*.176 is my ADSL-given IP (public).

The first two command is explained in
http://www.knowplace.org/netfilter/syntax.html#conf2
for port forwarding.

The lattest command is provided by G Wheelbarger in previous
message for opening the port.

Ubuntu Forums - HOWTO: Compiling and Installing WineCVS with WineTools

libindustrial.so intricacies

buen@gigabyte:~$ ls /usr/lib/gtk-2.0/2.4.0/engines/
libclearlooks.la libmist.la libpixmap.so libsmooth.so
libclearlooks.so libmist.so libredmond95.la libsvg.so
libindustrial.la libpixmap.a libredmond95.so libthinice.la
libindustrial.so libpixmap.la libsmooth.la libthinice.so
buen@gigabyte:~$ ls /usr/lib/gtk-2.0/modules/
libdwellmouselistener.a libferret.so libkeymouselistener.la
libdwellmouselistener.la libgail.so libkeymouselistener.so
libdwellmouselistener.so libkeymouselistener.a
buen@gigabyte:~$ cp /usr/lib/gtk
gtk-2.0/ gtkhtml/
buen@gigabyte:~$ cp /usr/lib/gtk-2.0/2.4.0/engines/libindustrial.* /usr/lib/gt
gthumb/ gtk-2.0/ gtkhtml/
buen@gigabyte:~$ cp /usr/lib/gtk-2.0/2.4.0/engines/libindustrial.* /usr/lib/gtk-2.0/modules/

Friday, June 24, 2005

Debian Administration :: Installing Sun's Java environment on Debian systems

Debian Administration :: Installing Sun's Java environment on Debian systems

Two packages we're going to need are java-package, and fakeroot. These can be installed simply:

apt-get install fakeroot java-package

Once the relevent packages have been installed you will need to download the Sun release of the Java package from http://java.sun.com

At the time of writing the most current version can be found here:

* http://java.sun.com/j2se/1.5.0/download.jsp

Once you agreed to the license presented to you, and have downloaded the file you will have something like jre-1_5_0_03-linux-i586.bin.

To turn this into a Debian package you should run:

fakeroot make-jpkg jre-1_5_0_03-linux-i586.bin

This command will first prompt for confirmation, then :

* Ask you for your name
* Ask you for your email address
* Display a license agreement:
o Press Space to scroll down, or q to quit.
o Type "yes" to indicate you agree with the terms.

(The name, and email address, you give will be inserted into the Debian package information - and not sent to Sun.)

Once these questions have been answered the process will inform you that your package has been built shortly afterwards. The final output you should expect to see will look something like this:

The Debian package has been created in the current directory. You can
install the package as root (e.g. dpkg -i sun-j2re1.5_1.5.0+update03_i386.deb).

As the instructions tell you it is now possible for you to install the package by becoming root and running:

dpkg -i sun-j2re1.5_1.5.0+update03_i386.deb

One final step might be for you to ensure the Java software works for Mozilla Firefox, or the Mozilla browser.

The package you've installed should include a plugin for your browser. At the time of writing the most recent Sun Java version we've been using will install a plugin for you at the following location:

/usr/lib/j2re1.5-sun/plugin/i386/ns7/libjavaplugin_oji.so

Create a symlink to this directory in your home directory:

ln -s /usr/lib/j2re1.5-sun/plugin/i386/ns7/libjavaplugin_oji.so ~/.mozilla/plugins/

If you wish to do this for all users on the current system instead run, as root:

ln -s /usr/lib/j2re1.5-sun/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/

(You might find that the plugin has been automatically installed for all users - so it's worth checking whether you need to complete this last step yourself.)

debian packages

Debian -- libfontconfig1

chikka on linux

.::underrated::.: "There are now two ways to use your Chikka account on your Linux Desktop.

How?! First, you may try to install Chix (Chikka for *nix) from http://chix.sourceforge.net via CVS and do the make, make install thing (it won’t work on me :( ) or you may now just use the Javalite from the Chikka website.

I use to use Chikka on a precompiled Chix given to me by Mhac. I used it both on Mandrake and Ubuntu. It was text-based but usable although it lacks the options found on the same Chikka program for Window$. The latest version of Chix can now be used on Gaim but I haven’t tried it as I can’t seem to make it work.

Fortunately, Chikka Javalite now works on Ubuntu although I am not sure if it also works on other Linux distributions. I am also not sure how come it now works on Linux because it didn’t worked way back then. Maybe the Chikka team did some tweaking or maybe the latest Java Runtime Environment (version 1.5.0_02) on Ubuntu did the trick. But then, I’m happy that it now works for me :) .

So now migrants from the land of Window$ will no longer miss their Chikka as they are welcomed to the land of the Free Linux…"

Wednesday, June 22, 2005

sunday and monday wala akong ibang ginawa kundi ipatch yung windows 2000 professional sa isang pc ko

kung writer lng ako, pwede na sa akin ang linux

kung purely web apps ang program namin, pwede na sa akin linux

kaso rich desktop application ang program namin. kailangan responsive, kailangan meron lookup(26,000 parts and accessories)

kung pwede na sa web app yung mga POS(point-of-sale) programs, sana web platform namin ginawa yung program, kaso wala naman hotkeys ang web, mouse and textbox lang

kahapon nag-install din ako ng ubuntu linux, maganda, very polished na yung look and feel ng desktop, parang cleartype n rin yung fonts

i-t-try ko rin yung bsd, mas ok daw file system ng bsd compare s ext2fs

Tuesday, June 21, 2005

nabura ko sourcecode ng blockexecute. buti n lng may cache result ang gds(google desktop search)

Attribute VB_Name = "modSystem"
Option Explicit
Option Compare Text
Dim c As ADODB.Connection


Sub Main()

Dim Basename As String

Basename = ""

Set c = New ADODB.Connection
c.CursorLocation = adUseClient
c.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\BlockExecute.mdb;Persist Security Info=False"


'Provider=Microsoft.Jet.OLEDB.4.0;Password=mikeruth;Data Source=E:\_NOT RELATED_\BlockExecute\BlockExecute.mdb;Persist Security Info=True


Dim I As Long

For I = Len(Command) To 1 Step -1

If Mid(Command, I, 1) = "\" Then
Exit For
End If

Basename = Mid(Command, I, 1) & Basename

Next


If InStr(1, Basename, " ") > 0 Then
Basename = Left(Basename, InStr(1, Basename, " ") - 1)
End If


Dim r As ADODB.Recordset
Set r = New ADODB.Recordset
r.Open "SELECT Filename, DateTimeExecuted FROM LastExecuted WHERE Filename = '" & Basename & "'", c, adOpenStatic, adLockOptimistic


If r.EOF Then
r.AddNew
r!FileName.Value = Basename
End If

r!DateTimeExecuted.Value = Now()
r.Update

r.Close
Set r = Nothing




Dim IsExist As Boolean
IsExist = c.Execute("SELECT COUNT(*) AS Cnt FROM Executable WHERE Filename = '" & Basename & "'").Fields("Cnt").Value > 0

c.Close
Set c = Nothing



If IsExist Then
Shell Command, vbNormalFocus
Else
MsgBox "Program not allowed to run." & vbCrLf & vbCrLf & "Contact MIS Department if you really need this program to run." & vbCrLf & "Look for either B)uen R)amos A)lcala T)olentino" & vbCrLf & """BRAT Boys""", vbExclamation, "BRAT Advisory"
End If


End Sub

Monday, June 20, 2005

Slashdot | AMD Athlon 64 FX-57 Review: "I realize the price will go down over time, but seriously, who is going to buy this chip?

You're asking the wrong question. Even if no one buys this chip, the chip is still worthwhile to have on the market.

A few years ago Wendy's found that almost no one was buying their triple cheeseburgers, so they took triples off the menu. When they did this, they found that sales of their double cheeseburgers dropped to almost nothing. The problem, as they discovered later, was that the presence of triple cheeseburgers on the menu helped to legitimize the double cheeseburgers as mainstream items. Without triple cheeseburgers, the double cheeseburgers became the high end item and mainstream buyers went for the singles instead.

Since profit margins on double cheeseburgers are higher, the chain was forced to bring back triple cheeseburgers, even though triples weren't selling at all, because the sales of their double cheeseburgers depended on having triples on the menu.

Point is, although this is a fast food example, the same thing applies to the computer industry. You HAVE to have a high end item available if you are to have any hope of positioning the more profitable midrange items as mainstream."

TipMonkies

Friday, June 17, 2005

World's Largest How-To Manual

Main Page - wikiHow

Thursday, June 16, 2005

Microsoft Windows XP: Using Software Restriction Policies to Protect Against Unauthorized Software

Yossy's dump(70-296) MCSE Braindumps, the best free braindumps site for certification exams like 070-210, 070-215 and more!: "INFO: "

Tuesday, June 14, 2005

Retronym

Slashdot | Comparing Linux and BSD, Diplomatically

Slashdot | Comparing Linux and BSD, Diplomatically: "If he looks at BSD internals, anything he comes up with relation to those internals might be considered derivative works and would need to be BSD licensed.

I was going to mod you down since I've got the points, but there isn't an 'Incorrect, -1' moderation.

The BSD license is about as liberal as it gets, basically saying 'Do what you want with the code but leave my copyright notice.' This includes sticking the BSD code into GPL'd code, XYZ'd code, or even closed, proprietary code.

GPL is the license that says what is open must stay open, and even with that, only if you copy the actual code. 'Ideas' are not protected by copyright, just expression. Protecting designs and more recently ideas is what patent law is for."

NewsForge | Linus compares Linux and BSDs

NewsForge | Linus compares Linux and BSDs: "To me, it's largely a mentality issue. I said 'good enough,' and that's really telling. The BSD people (and keep in mind that I'm obviously generalizing) are often perfectionists. They hone something specific for a long time, and then they frown on anything that doesn't meet their standards of perfection. The OpenBSD single-minded focus on security is a good example.

In contrast, one of my favorite mantras is 'perfect is the enemy of good,' and the idea is that 'good enough' is actually a lot more flexible than some idealized perfection. The world simply isn't black-and-white, and I recognize a lot of grayness. I often find black-and-white people a bit stupid, truth be told."

Cprogramming.com - Tutorials: C++ Made Easy

Cprogramming.com - Tutorials: C++ Made Easy:

public void circleSimple(int xCenter, int yCenter, int radius, Color c)
{
int pix = c.getRGB();
int x, y, r2;

r2 = radius * radius;
for (x = -radius; x <= radius; x++) {
y = (int) (Math.sqrt(r2 - x*x) + 0.5);
raster.setPixel(pix, xCenter + x, yCenter + y);
raster.setPixel(pix, xCenter + x, yCenter - y);
}
}

Comp 136 -- Circle-Drawing Algorithms:

public void circleSimple(int xCenter, int yCenter, int radius, Color c)
{
int pix = c.getRGB();
int x, y, r2;

r2 = radius * radius;
for (x = -radius; x <= radius; x++) {
y = (int) (Math.sqrt(r2 - x*x) + 0.5);
raster.setPixel(pix, xCenter + x, yCenter + y);
raster.setPixel(pix, xCenter + x, yCenter - y);
}
}

Monday, June 13, 2005

Slashdot | Body Modifications Still Hinder IT Professionals?

Slashdot | Body Modifications Still Hinder IT Professionals?:

A wise person once told me that the difference between a good choice and a bad choice is that a good choice gives you more choices.

Considering how many types of (strech) pierchings and tatoos are difficult to reverse, why would someone want to get one? What kind of long term plan/goal does it promote?

Slashdot | Body Modifications Still Hinder IT Professionals?

Slashdot | Body Modifications Still Hinder IT Professionals?:

Dress code at a company I worked at was "business casual", with no reference to ink at all.

Then one day one of our desk-side techs (who really was a nice guy, by the way), got a complaint reported by a user. It was a little old lady who litterally was scared of the tech because of the ink on his arms. (a guitar, if memory serves) Instantly a new dress code went into place stating no visible tatoos. He was banished to long sleeves for the rest of his time at the company.

The moral: In a consulting company it ain't the boss who sets dress code. The client does.

-MrLogic

Slashdot | Body Modifications Still Hinder IT Professionals?

Slashdot | Body Modifications Still Hinder IT Professionals?:

Hey, it's helped me in the past!

One Friday, I had gotten my tongue pierced, by Monday, my tongue had swelled up so much, I could barely talk.

We were in a meeting that day, I received my assignments for the day with a slight mumble grumble - I guess my boss thought I was overtly stressed or just not happy with what I had to do.

He called me into the conference room and gave me a 150% raise, telling me how good he thought I was to the company and that he was so glad I was with them. I don't think he knew about the tongue ring for weeks...

The next month, I dyed my hair green...

Sunday, June 12, 2005

HOW TO: Disable Notification Area Balloon Tips in Windows XP

Slashdot | Could Apple's Intel Desktop Threaten Linux?: "Well, Windows has no root, so they at best could take over the 'Administrator of all Evil'."

Saturday, June 11, 2005

Math Forum - Ask Dr. Math:


I am trying to figure out why the method below, called the "method of
complements" by my university professor, will give me the correct
answer all of the time. It is used in place of regrouping in
subtraction problems.

623 999
-465 -465
----- -----
158 534
+623
-----
1157

/157 (Cross off the 1 in the thousands column and add

+1 this 1 to the ones column.
-----
158

Nines must always be used, and the order of operations depicted above
must be followed. If these conditions are met, the problem will always
work no matter how many numbers are in the problem. This will also
work with standard subtraction when regrouping is not necessary. I
would like to know why this method works. What mathematics are lurking
behind the scenes? I wish to explain this to a third grade child I am
student teaching.

Thursday, June 09, 2005

jardMail - Know Pun Intended

jardMail - Know Pun Intended: "# A bicycle can't stand on its own because it is two-tired.
# What's the definition of a will? (It's a dead giveaway).
# Time flies like an arrow. Fruit flies like a banana.
# A backwards poet writes inverse.
# In democracy it's your vote that counts. In feudalism it's your count that votes.
# She had a boyfriend with a wooden leg, but broke it off.
# A chicken crossing the road is poultry in motion.
# If you don't pay your exorcist you get repossessed.
# With her marriage she got a new name and a dress.
# Show me a piano falling down a mineshaft and I'll show you A- flat minor.
# When a clock is hungry it goes back four seconds.
# The man who fell into an upholstery machine is fully recovered.
# A grenade thrown into a kitchen in France would result in Linoleum Blownapart.
# You feel stuck with your debt if you can't budge it.
# Local Area Network in Australia: the LAN down under.
# He often broke into song because he couldn't find the key.
# Every calendar's days are numbered.
# A lot of money is tainted. It taint yours and it taint mine.
# A boiled egg in the morning is hard to beat.
# He had a photographic memory that was never developed.
# A plateau is a high form of flattery.
# The short fortune-teller who escaped from prison was a small medium at large.
# Those who get too big for their britches will be exposed in the end.
# Once you've seen one shopping center you've seen a mall.
# Those who jump off a Paris bridge are in Seine.
# When an actress saw her first strands of gray hair she thought she'd dye.
# Bakers trade bread recipes on a knead to know basis.
# Santa's helpers are subordinate clauses.
# Acupuncture is a jab well done.
# Marathon runners with bad footwear suffer the agony of defeat."

The Bereans: Apologetics Research Ministry

The Bereans: Apologetics Research Ministry

Former ADD Member Turns Christian Preacher

Date: Wed, 21 May 2003 13:29:41 +0800

Justyn,

Well, I’m 28 years old. I began listening to Bro. Eli way back in 1992. I’m still in high school then. Afterwards, I was really convinced of his teachings because of his rhetoric and logical explanations. On July 9, 1999 I decided to undergo the indoctrination and eventually joined the ADD, “Church of God in Christ Jesus, the Pillar and Ground of Truth.” It was Sister Cathy de la Pena in Quiapo who eventually indoctrinated me and I would attend the session enthusiastically and zealously. I became a member and attended Ang Local ng Parang in our area.

Since I was convinced that Bro. Eli was really a man of God, I never had any doubts. Anyway, as I attended the Pasasalamat in Apalit, Pampanga, I began to think rationally that why is it that in a certain church sermon around August of 1999, Bro. Eli lambasted and suspended a member who questions the disbursement of funds for the making of the school (yun yatang La Vertud School if I'm not mistaken) Parang hindi ko nakita sa kanya yung pinakamahalagang teaching sa Bible: Love. But you know, since I’m afraid to question him because he seems infallible and unquestionable, I decided to continue. Nung first time naman akong umatend ng gawain sa local ng [deleted], naka shorts ako nun but with all honesty, di ko alam na bawal. Na-offend ako ng pinagsabihan ako ng presidente ng locale na, "BAWAL yan!" In a loud voice, not knowing na di ko naman alam na bawal; I was terribly offended.

One interesting part of my story is that in January of 2000, I had a girlfriend. It was part of our teaching that eventually dapat ang girlfriend mo kaanib din ng Iglesia (ng Dios) kung miyembro ka na. The problem is, my girlfriend is a member naman of the Church of Jesus Christ of the Latter Day Saints (Mormons). It was the first time I was terribly in love. So much in love with this girl. But you know, it was a struggle kasi my girlfriend said, “I will not marry outside the Church.” So that we will be eternally sealed. The manga-gawa adviced me na isama sa mga gawain yung girlfriend ko para malaman niya katotohanan while my girlfriend enticed me to join her. So, litong lito ako. Isip ba o puso papairalin ko.

Then, I decided not to attend ADD Pasasalamat muna. The mangagawa visited me always. Tinatanong ako kung bakit di na ko umaatend and told me nagkakasala ako spiritually niyan. Palaging tinatanong, I remember kung kumain ako ng dinuguan, nanood ng sine, o nakikain sa piyesta kasi kasalanang ikamamatay daw yun.

It was also a burden for me kasi by early January, my brother was also engaged into drugs. Nagsa-shabu pala yung kuya ko kaya spiritually and physically down ang family. My Father and mother were eventually attending the [deleted] Christian Ministry in [deleted]. A born-again church here. They were patiently attending it. Nakita ko na talagang they were constantly praying and attending the church to pray for us.

Then, a miracle happend which I can’t explain. Ilang beses nagrehabilitate yung kuya ko. Pero walang effect. But suddenly, he saw the Bible, tapos nanalangin yung kuya ko. “Kung totoo ka Lord, ipakita mo sa akin ang layunin mo. Baguhin mo ko” These were the exact words of my Kuya. Tapos biglaan eh. He read the Bible everyday, and it changed him. Walang rehabilitation, walang intervention ng tao. Nung gumaling kuya ko he kept on attending the fellowship and he was truly changed. I introduced him to Bro. Eli on television and often told him Bro. Eli will lead us toward salvation to God.

I am often very hot to engage him in a heated debate. But I saw the change in my kuya. He has a gentle spirit. He never engaged me in a debate and often said that how wonderful Christ has changed him. Natatawa ako kasi parang ang bait bait pero di naman niya memorize bible. Kasi ang basehan namin sa ADD kahit na mabait ka basta hindi mo maipagtanggol ang paniniwala mo, sa demonyo ka pa din.

Then on April 21, 2001, Nagusap kami ng kuya ko. Nanonood kami ng ADD noon sa TV Then he told me to observe Bro. Eli. May ka-debate si Bro. Eli noon. While we were watching my kuya opened the Bible sa 1 Cor. 13:4. Tungkol sa “love.” Sabi niya obserbahan mo ha:

Love is patient. Tingnan mo ha. Is he patient?

Bro. Eli: “Talo ka na! Talo ka na! Talo ka na!”

Love is kind:

Bro. Eli: “Gago, ka! Tarantado, Walanghiya ka. Matinding kaululan yan”.

It is not envy, it is not proud:

Bro. Eli: “Bobo ka sa Biblia!” Kalbularan! (refering to Ka Bularan of INC 1914)

It is not rude:

Bro. Eli: “Lahat ng born again na pastor, matatakaw kayo sa pera! Mga Aso kayo!”

It is not self-seeking:

Bro. Eli: “Ako lang ang mangangaral na mahirap. Lahat sila mga milyonaryo, bilyonaryo pa nga!”

It is not easily angered:

Bro. Eli: “Gxxx! Gxxx KA! TALO KA NA! TALO KA NA!.”

Na offend ako sa kuya ko nun. Then sabi ko talunin muna niya si Bro. Eli kung gusto niya ko mapaniwala. Sa samahan namin kumakalinga kami sa mga matandang balo at mahihirap at ulila. Sabi ng kuya ko: 1 Cor. 13: 3, “If I give all I possess to the poor and surrendered my body to the flames yet have not loved I AM NOTHING.”

Tapos sabi ko eh, bobo naman ang mga born again sa Biblia. 2 o 3 sitas lang ang alam mali pa pakahulugan! Then my kuya uttered: 1 Cor. 13:2, “If I have the gift of prophecy and can fathom all the mysteries and ALL KNOWLEDGE , yet I have not loved, IAM NOTHING!”

Those were the opening verses na pinag-isipan ko buong gabi. Then on May 2, 2001, I cried and accepted the Lord Christ as my Saviour. I informed my girlfriend and she broke-up with me. Ayaw na niya kasi di ako magpa-Mormons. Ayaw ko din kasi meron silang Book of Mormon (sic) and hindi matanggap ng budhi ko ang turo ng mga Mormons. These events were the worst in my life. Hindi ako makatulog. Nahulog weight ko. Nawala ang mga friends ko sa ADD and nananaginip ako palagi na mapapahamak ako kasi umalis ako sa ADD. Puro fear ang ginawa ng kaaway sa akin. Then, pinuntahan ako ng mangagawa and told me: “Sino ba ang pinagmamalaki mong sinamahan mo”. Sabi ko, “I am watching the 700 Club.” Tapos, sabi ng manggagawa “Naku puro pera lang yan si Pat Robertson!” Tapos nanlilisik yung mata niya at sinabi sa akin, may ibang espiritu daw akong dala. Pero, I think because I have the Holy Spirit nakita ko yung ibang panlilisik ng mata nung mangagawa. Dun ko nakita personally na ibang spirit nga ang dala dala niya.

I really saw it in the eyes of the mangagawa, Justyn. Siguro nagalit ang spirit na nasa kanya kasi I have been with Christ and the Spirit of Christ dwells in me. The gentle spirit.

Sa ngayon, nagse-serve ako sa church namin as preacher din. Telling of my wondrous tale. Kaya nga I’m happy I can relate my story to you. I really wanted to join your group. At the same time I’m also a full time professor at the University of Santo Tomas, sa [deleted].

Till next time.

Danny [Not the true name]

Note: Some items have been deleted for security purposes. There are also some minor grammar and spelling corrections for readability.

Wednesday, June 08, 2005

masasamang tao

Gov.ph Home - Forum: " re:Sir, my family is in deep trouble with a Credit Card Company • (267 bytes)
Posted: 6/6/2005 • 19:53 GMT+8

By:
tulongpo
registered: 6/1/2005
member
Philippines
share ko lang yung kilala ko noon.. dying na ang mom nila.. so mega use nila ang cred card ng mom nila kc alam nila na kapag mamatay ang mom nila eh wala ng habol ang cred card compy. so ganon nga ang nangyari... nag benefit sila sa cred card ng mom nila... ang saya! "

World Wide Web, here we come! - INQ7.net: "DID you know that less than 40 percent of the country's public high schools have computer laboratories and only 4 percent of these labs are connected to the Internet?

To the rescue comes Project Gilas, an acronym for Gearing up Internet Literacy Access for Students. It is a multi-sectoral initiative that aims to provide Internet access to students and basic Internet literacy programs in all the 5,433 public secondary schools in the Philippines.

The mission is led by a consortium of private corporations and civic organizations in coordination and cooperation with the Department of Education.

Senior high school students in the country's public schools will be the first beneficiaries. Depending on student density and availability of PC workstations, the Internet laboratories may be made available to high school students in lower years as well."

DomAPI - DHTML Platform

Sunday, June 05, 2005

words ambiguity

Slashdot | Mac Install-Base Shown to Be 16%: "if i had to guess, it would be that the parent is from the US, and the grandparent is from Australia or the UK. in those countries, the '6 monthly' formulation is the norm for every six months. having been a visiting physician in papua new guinea (ex-australian protectorate) i had to get used to a medication dosage schedule of '6 hourly' meaning once every six hours and not six every hour.
"

Chris Justus - Server Side Guy: Google Suggest Dissected...: "http://www.google.com/complete/search?hl=en&js=true&qu=java"

Chris Justus - Server Side Guy: Google Suggest Dissected...

Chris Justus - Server Side Guy: Google Suggest Dissected...: "Things I didn't know before this exercise that I learned going through this...
1) You can turn the browsers autocomplete off by adding autocomplete='off' attribute to an input field... How did I not know this before...
2) The XMLHTTP / XMLHttpRequest object to communicate back with a server and get new info / instructions without refreshing the page ... the new black of web development... go read everything you can about this...
3) How powerful the keypress handling can be with javascript... (capturing keyup/keydown and events and changing state for cursor key events, etc...)
4) You can highlight text in an input field using javascript..."

Google Suggest

Saturday, June 04, 2005

FreeBSD Handbook

Download FreeBSD for i386 ISO 5.4 RC4 - ISO version of FreeBSD UNIX - Softpedia

Download FreeBSD for i386 ISO 5.4 RC4 - ISO version of FreeBSD UNIX - Softpedia: "Linux is for those who hate Microsoft, BSD is for those who love Unix' ;)"

Voice Newsletter 11/2000 -LVM, FDISK and Partition Magic

Voice Newsletter 11/2000 -LVM, FDISK and Partition Magic:

# A deleted partition isn't necessarily the end of things. All the data is still there, it's just that the operating system doesn't know the start and end of it, so to speak. All you have to do is to recreate the partition, EXACTLY as big as it was and in EXACTLY the same place on the disk. If the partition occupied the whole disk or was between two other partitions, this shouldn't be a problem as long as you use the same program to recreate it as you did to delete it (rebooting in the meantime doesn't do any harm, but doesn't help either).

# Now the important thing, especially if you use Partition Magic, is that you DO NOT CREATE A FILESYSTEM ON THE NEW PARTITION! The thing is, if you create a partition with Partition Magic and tell it to use a particular filesystem on it, that is basically the same as formatting the partition. It overwrites the areas of the disk where the filesystem was with a new, empty filesystem. If this happens, there is NO WAY to recover your data (unless you go to a professional company, which will cost you $$$$$). So: Select 'Unformatted' when Partition Magic asks what filesystem to put on the new partition! After creating the partition again, use LVM to create a volume using it, and it should be fine. In case you don't see any files on the partition, run CHKDSK; this will look for filesystem structures and restore the files on your disk.

AnandTech: No more mysteries: Apple's G5 versus x86, Mac OS X versus Linux

AnandTech: No more mysteries: Apple's G5 versus x86, Mac OS X versus Linux: "Mac OS X is incredibly slow, between 2 and 5(!) times slower, in creating new threads, as it doesn't use kernel threads, and has to go through extra layers (wrappers). No need to continue our search: the G5 might not be the fastest integer CPU on earth - its database performance is completely crippled by an asthmatic operating system that needs up to 5 times more time to handle and create threads.
"

AnandTech: No more mysteries: Apple's G5 versus x86, Mac OS X versus Linux

AnandTech: No more mysteries: Apple's G5 versus x86, Mac OS X versus Linux: "Darwin is indeed the open Source project around the Mach kernel 3.0. This operating system is based around the idea of a microkernel, a kernel that only contains the essence of the operating system, such as protected memory, fine-grained multithreading and symmetric multiprocessing support. This in contrast to 'monolithic' operating systems, which have all of the code in a single large kernel.

Everything else is located in smaller programs, servers, which communicate with each other via ports and an IPC (Inter Process Communication) system. Explaining this in detail is beyond the scope of this article (read more here). But in a nutshell, a Mach microkernel should be more elegant, easier to debug and better at keeping different processes from writing in eachother's protected memory areas than our typical 'monolithic' operating systems such as Linux and Windows NT/XP/2000. The Mach microkernel was believed to be the future of all operating systems.

However, you must know that applications (in the userspace) need, of course, access to the services of the kernel. In Unix, this is done with a Syscall, and it results in two context switches (the CPU has to swap out one process for another): from the application to the kernel and back.

The relatively complicated memory management (especially if the server process runs in user mode instead of kernel) and IPC messaging makes a call to the Mach kernel a lot slower, up to 6 times slower than the monolithic ones!

It also must be remarked that, for example, Linux is not completely a monolithic OS. You can choose whether you like to incorporate a driver in the kernel (faster, but more complex) or in userspace (slower, but the kernel remains slimmer). "

Inspirational Garden

Inspirational Garden
(Eleanor Power)

Plant 5 rows of Peas:

    Prayer, perseverance, politeness, promptness, and purity
Plant 3 rows of Squash:

    Squash gossip, squash criticism, and squash indifference.
Plant 5 rows of lettuce:

    Let us be faithful to duty; let us be unselfish; let us be truth- ful; let us follow Christ; let us love one another.
No garden is complete without Turnips:

    Turn up for church;

    turn up with a smile;

    turn up with new ideas;

    turn up with determination to make everything count for something good and worthwhile.

Friday, June 03, 2005

Programmers Heaven - Delphi & Kylix programming zone

Thursday, June 02, 2005

Wanna Chat with a Web Service?: "Kylix"

Language Programming Runtimes

VB vs. Delphi: What’s the Difference?

VB vs. Delphi: What’s the Difference?: "LISTING 1a:
This small VB program draws randomly colored lines all over the application window.

Option Explicit
Sub Form_Load ()
Randomize 'Init random number generator
DrawWidth = 2 'Set line width to 2
End Sub

Sub Timer1_Timer ()
Dim R, G, B, X2, Y2

'Create random RGB colors
R = 255 * Rnd
G = 255 * Rnd
B = 255 * Rnd

'Set end point of line to random spot on form
X2 = Int(DemoForm.Width * Rnd + 1)
Y2 = Int(DemoForm.Height * Rnd + 1)
Line -(X2, Y2), RGB(R, G, B)
End Sub

LISTING 1b:
This small Delphi program has almost a one-for-one correspondence to the VB program (left).

procedure TForm1.FormCreate(Sender: TObject);
begin
Randomize; {Init random number generator}
Canvas.Pen.Width:= 2; {Set drawing width to 2}
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var
R, G, B, X2, Y2: Integer;
begin
{Create random RGB colors}
R:= Random (256);
G:= Random (256);
B:= Random (256);
Canvas.Pen.Color:= RGB (R, G, B);
{Set end point of line to random spot on form}
X2:= Random (ClientWidth);
Y2:= Random (ClientHeight);
Canvas.LineTo (X2, Y2);
end;

"

Wednesday, June 01, 2005

"what i'm doing at that moment is exactly what i want to be doing"

Static JAH demo

IA: staticjah.html


function jah(url,target) {
// native XMLHttpRequest object
if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
req.onreadystatechange = jahDone;
req.target=target;
req.open("GET", url, true);
req.send(null);
// IE/Windows ActiveX version
} else if (window.ActiveXObject) {
req = new ActiveXObject("Microsoft.XMLHTTP");
if (req) {
req.onreadystatechange = jahDone;
req.target=target;
req.open("GET", url, true);
req.send();
}
}
}

function jahDone() {
// only if req is "loaded"
if (req.readyState == 4) {
// only if "OK"
if (req.status == 200) {
results = req.responseText;
document.getElementById(req.target).innerHTML = results;
} else {
document.getElementById(req.target).innerHTML="jah error:\n" +
req.statusText;
}
}
}