Wednesday, May 24, 2006

Mozilla Firefox 1.5.0.3

The world is depending on the information and most the information you need is on the internet. Therefore, the tools are critical to save time when wanting to find a piece of information is missing in the puzzle which helps you to do the job better. Who control the information on the internet will be the one will success (a hint from Bill Gate). Mozilla Firefox just does that, it is very fast to search the webs, find info from net then find info in the page, find info. on the web with the less keystrokes less interrupt let your ideas flow from one page to another page for example to search in the article just ctrl f or ctrl + most the key controls as same as other applications like photoshop, or MS word no need to learn a new keystroke control key. I mean that you search the web then you search the content in that page. Google does very good job in this. Larry P. said that the information now can be reached anyone in the globe, there is no different for one engineer sits in the San Jose, Cali and one engineer sits in Bangalore, India. I think the hint & idea from Bill G. and Larry are so correct. In the mozilla-firefox, the search engine is on the top, the bottom appears when needed not like the old browser like Netscape, IE each time find something in the article typing ctrl f and it appears in the middle of the page so you can not see the page. I am using mozilla 1.0 in linux then change to mozilla-firefox 1.0 and last night upgraded to mozilla-firefox 1.5.0.3 - this is a killer application on the net for me. When install just download the rpm it is easy to install no need to compile just a simple command: rpm -ivh firefox-0.10.1-0.1.1.fc1.test.i386.rpm
The final version http://www.mozilla.com/firefox/
No need to remember anything just on left top corner click on Google: mozilla-firefox it will bring to the site. This is why I try talking about the power of information. There is a ton of information you need for your job just search to find a right tutorial and you almost do everything by yourself especially for who is self learning. One thing I wish that the search box in top left should be wider, cache better (if you open the same page it should be faster) because it has been cache, and last file download seems often corrupt and stop without warning. When you install gets the error and do the file check that it is different from original. During download if the connection is down you have to download all over again it is time consume with large file it should remember when it left off and when connected again it should start whereis left off like other program Flashget...if it is incorperated into Mozilla Firefox it will great.
I think it is not because the modem or ADSL are slow but the application makes the browser runs slow. For example we can implement the fast TCP/IP for these applications instead of the old traditional TCP/IP. For more info. about using it http://mozilla.gunnars.net/firefox_bookmarks_tutorial.html
when you go through this tutorial about bookmark manager and other functions you are glad that
I am telling that it has many awsome features. And last, mozilla firefox is a smart browser (secure)it lets you know cookies/any spy adware/tracking adware/virus detection/detected live bookmark (dynamic website/RSS/XML) this allows to download multi news and you can view at one no waiting to download, see above link for tutorial.
So the race is on between IE and the others. Von Brown once said, "the innovation takes time" John F Kennedy once said,"we decide to go to moon not because it is easy but because it is hard".

Saturday, May 20, 2006

XAMPP for apache, php and mysql

Download: http://www.apachefriends.org/en/xampp.html

XAMPP for Linux
The distribution for Linux systems (tested for SuSE, RedHat, Mandrake and Debian) contains: Apache, MySQL, PHP & PEAR, Perl, ProFTPD, phpMyAdmin, OpenSSL, GD, Freetype2, libjpeg, libpng, gdbm, zlib, expat, Sablotron, libxml, Ming, Webalizer, pdf class, ncurses, mod_perl, FreeTDS, gettext, mcrypt, mhash, eAccelerator, SQLite and IMAP C-Client.
XAMPP for Windows
The distribution for Windows 98, NT, 2000 and XP. This version contains: Apache, MySQL, PHP + PEAR, Perl, mod_php, mod_perl, mod_ssl, OpenSSL, phpMyAdmin, Webalizer, Mercury Mail Transport System for Win32 and NetWare Systems v3.32, JpGraph, FileZilla FTP Server, mcrypt, eAccelerator, SQLite, and WEB-DAV + mod_auth_mysql.

Tuesday, May 16, 2006

ActiveX vs. Java Applet

ActiveX is a technology developed by Microsoft. With an ActiveX-enabled browser (ie Internet Explorer only) ActiveX controls can be downloaded as part of a Web document to add functionality to the browser (similar to Java applets). In particular ActiveX enables seamless viewing of Windows files of all types, eg spreadsheets, and in combination with other technologies such as Java and scripting languages, makes possible the development of complex Web applications. ...

Does Active X works with Linux, I guess it is not because it is not windows, I tried Java applets for dialing to Netzero (ISP), it is all works for both linux and windows. Linux needs jre-1_5_0-linux-i586.bin and windows need C:\Program Files\Java\jre1.5.0_01\bin\npjpi150_01.dll

Linux:
download netzero.deb
cp netzero.deb /
cd /
ar -xv netzero.deb
gunzip data.tar.gz
tar xvf data.tar
Install java jre
cd /opt/nzclient
./runclient.sh

Create a file to get on desktop of cd ~/gnome-desktop links/associated to /java/jre-1_5_0/opt/runclient.sh
Click to dial from desktop of gnome.

Mambo, oscommerce, and weberp

These 3 packets supports everything you need from ERP to oscommerce. Mambo supports to dynamic web pages using content management systems.

Mambo <--> www (oscommerce) <---> webERP

oscommerce is good for back end and mambo is good for front end.
WebERP allows users to access ERP at any places. WebERP and oscommerce can share
the same database. So if the user buys an item, it issues an invoice that will go
to WebERP to generate quarter sales ---> for tax or income just one button.

DNS

- Buy a domain then go to domain names server set up IP address of your web hosting
This is standard zone - Fill the IP of web hosting usually 2 boxes:
Standard Primary: 63.247.87.178
(get from web hosting server IP which is dynamic IP
share among many users if you are mini reseller web hosting)
Standard Secondary: 63.247.87.179
- Go to WHM web host mangement (it is not control panel) set up the account using
that domain for example: www.objectlayer.com but only need to put objectlayer.com
Set up space needs for this website, bandwidth, username and password

- Go to control panel set up the rest: email address, database mysql, security...

that is all, when it works you are able to ping the website and it will reply
Run -> cmd -> dos command -> ping objectlayer.com (using ICMP)

C:\Documents and Settings\Administrator>ping objectlayer.com

Pinging objectlayer.com [63.247.87.178] with 32 bytes of data:

Reply from 63.247.87.178: bytes=32 time=153ms TTL=48
Reply from 63.247.87.178: bytes=32 time=163ms TTL=48
Reply from 63.247.87.178: bytes=32 time=171ms TTL=48
Reply from 63.247.87.178: bytes=32 time=159ms TTL=48

When you type www.objectlayer.com --> DNS to get IP --> web hosting and information
is stored here so if the browser asks for HTTP request will get HTTP response
Depend on request it could be GET, HEAD and POST. If the server could not find the page error 5xx (client 4xx)
Basically, web server responds to the request from web brownser usually is on the port 80 (HTTPs on port 443 for SSL) this service that the user need to pay web hosting service if they want to have it for their shopping on line.
HTPPs is working on oscommerce by submitting the predefined URL to credit card or banking under POST (Paypal using winsock), the result is again on the predefined on
the users' website. From the result code, the users (seller) can determ if the buyer can buy their products.

Thread vs. process

One difference: Threads within a process share a single address space, and can, with care (synchronization), access one another's variables. Processes run in different address spaces, and must use inter-process communications mechanisms to exchange information.
Processes Versus Threads


Other Terms:

Heavyweight Process = Process
Lightweight Process = Thread


Advantages (Thread vs. Process):

Much quicker to create a thread than a process.
Much quicker to switch between threads than to switch between processes.
Threads share data easily


Disadvantages (Thread vs. Process):

No security between threads: One thread can stomp on another thread's data.
For threads which are supported by user thread package instead of the kernel:
If one thread blocks, all threads in task block

Thread States (Example Java):

New = New: Placed on the ready list.
Blocked = Wait for an event
Runnable = Ready or Running
Dead = Exit


Thread functions: POSIX (Standard UNIX C/C++):

pthread_create(): creates a thread
pthread_exit(): kills itself
pthread_kill(): sends a signal to a specified thread
pthread_join(): waits for a thread to exit.
pthread_self(): returns thread id
synchronization functions


Java Implementation
http://objectlayer.blogspot.ca/2012/06/java-threads-for-hello-world.html
Define a class to contain a thread, by defining:
class Worker1 extends Thread OR
class Worker2 implements Runnable (Recommended)
The parent thread creates the object and invokes its start() function.
The start function creates the child thread and calls the object’s run() function.
Thread terminates when thread returns from run(), or stop() is called.

Types of Thread Implementations


User Thread Package

A package outside the OS creates and schedules threads.
Model: Many-to-one: Many user threads associated with one process.
Thread creation/management is faster than Kernel Thread support
However if one thread blocks, then entire process blocks. Thus all threads block.


Kernel Thread Support

The OS creates and schedules threads.
Model: One-to-one: Each user thread is associated with one kernel thread.
If one thread blocks, the kernel can schedule other threads.
If multiprocessor configuration, kernel can allocate threads of same process on different processors.
Example: Windows NT, Solaris, Digital UNIX

Many-to-Many Model: Combination of above

N user threads share M kernel threads (where N > M)
There may be a flexible and changing assignment of user threads to kernel threads.
Bound: User-thread is assigned permanently to kernel thread
Unbound: User threads share available kernel threads
Example: Solaris
----------------------deadlock vs. race condition
DeadlocksA deadlock occurs when one or more threads are permanently blocked from executing because each thread waits on a resource held by another thread in the deadlock. A thread can also deadlock on itself. The simplest case of deadlock occurs when process p1 gains access to data structure a and process p2 gains access to b, but p1 then waits for b and p2 waits for a.
A deadlock
occurs when one or more threads are stuck waiting for something that never will
occur.(advanced linux program p.82)
Race Conditions
A race condition occurs when two or more threads perform an operation, and the result of the operation depends on unpredictable timing factors; specifically, when each thread executes and waits and when each thread completes the operation.
The result is trouble. Because both processes see the same scull device, each will
store its new memory in the same place in the quantum set. If A stores its pointer
first, B will overwrite that pointer when it does its store. Thus the memory allocated by A, and the data written therein, will be lost.