| Giả lập Windows Mobile 6.0 trên máy tính |
17/12/2007, 08:44 Windows Mobile 6 (WM6) là hệ điều hành mới nhất dành cho các thiết bị di động của Microsoft. WM6 có 2 phiên bản hướng theo loại màn hình của thiết bị: bản standard hướng đến thiết bị không có màn hình cảm ứng (như Smartphone); bản professional hướng đến thiết bị có màn hình cảm ứng. Tương ứng với 2 phiên bản trên là 2 phiên bản mô phỏng chạy trên Hệ điều hành Windows XP/2003/Vista. Với bản mô phỏng này, người sử dụng có thể cài đặt, thử nghiệm các chương trình trên máy mô phỏng mà không cần cài vào thiết bị. 1. Download Có thể download các image của WM6 tại đây. Trên site ở đường dẫn trên, có thể download file Windows Mobile 6 Standard Images (USA).msi (73.3 MB). File này chứa các giao diện như sau: + Windows Mobile 6 Standard (176x220 pixels - 96 dpi) + Windows Mobile 6 Standard Landscape QVGA (240x320 pixels - 131 dpi) + Windows Mobile 6 Standard QVGA (320x240 pixels - 131 dpi) Hoặc có thể download file Windows Mobile 6 Professional Images (USA).msi (183.1 MB). File này chứa các giao diện như sau: + Windows Mobile 6 Classic (240x320 pixels - 96 dpi) + Windows Mobile 6 Professional (240x320 pixels - 96 dpi) + Windows Mobile 6 Professional Square (240x240 pixels - 96 dpi) + Windows Mobile 6 Professional Square QVGA (320x320 pixels - 128 dpi) + Windows Mobile 6 Professional Square VGA (480x480 pixels - 192 dpi) + Windows Mobile 6 Professional VGA (480x640 pixels - 192 dpi) 2. Yêu cầu cho WM6 Emulator - Hệ điều hành hỗ trợ: Windows 2000 SP4, XP, 2003, Vista. Bài viết này sẽ hướng dẫn trên Windows XP. Các hệ điều hành khác, bạn đọc tự nghiên cứu. - Trên Windows 2000/XP/2003, download ActiveSync V4.5: http://www.microsoft.com/windowsmobile/activesync/activesync45.mspx - Microsoft .NET Compact Framework: tại đây 3. Hướng dẫn sử dụng - Sau khi download WM6 Standard; WM6 Professional; ActiveSync, lần lượt cài đặt các chương trình. Quá trị cài đặt khá đơn giản. Khi kết thúc cài đặt ActiveSync, khởi động lại máy tính. - WM6 sau khi cài đặt sẽ theo đường dẫn Start -> Programs -> Windows Mobile 6 SDK. Các skin sẽ nằm trong Standalone Emulator Images -> US US English. Để chạy một mô phỏng của WM6, chọn đường dẫn Start -> Programs -> Windows Mobile 6 SDK -> Standalone Emulator Images -> US English, sau đó chọn skin tương ứng. Ví dụ Windows Mobile 6 Standard Landscape, chọn -> Standard Landscape. Giao diện của mô phỏng WM6 tương ứng như hình dưới. ![]() WM6 Standard Landscape a. Save State and Exit Save State and Exit là chức năng cho phép lưu trạng thái hiện thời của mô phỏng WM6. Sau khi cài đặt, cấu hình trên mô phỏng WM6, chọn chức năng này để lưu lại các thông tin. Để chạy chức năng này, chọn menu File -> Save State and Exit. Các file Save State sẽ được lưu lại theo đường dẫn Documents and SettingsApplication DataMicrosoftDevice Emulator, trong đó sẽ tương ứng với tên user đang sử dụng Windows XP. Sau khi lưu lại trạng thái của mô phỏng WM6, khác với mô phỏng WM5, chỉ cần chạy lại là sẽ WM6 Save State sẽ ngầm định được nạp lại. ![]() WM6 Professional Square b. Reset Mô phỏng WM6 có 2 chức năng là Hard Reset và Soft Reset. Hai chức năng này có thể tìm thấy ở menu File -> Reset. Soft Reset là việc khởi động lại hệ điều hành WM6. Còn Hard Reset sẽ nạp lại cả hệ điều hành của WM6, xóa hết các thông tin trên thiết bị. Các chức năng này cũng tương tự như máy thật. c. Share Folder Lựa chọn từ menu File -> Configure cho phép cấu hình các thông tin liên quan đến máy mô phỏng. Emulator Properties Trong các tab của Emulator Properties, cần chú ý đến tab General với lựa chọn Share Folder. Như đã biết khả năng lưu trữ của PPC/Smarphon rất thấp, chỉ khoảng 64-128 MB. Muốn tăng khả năng lưu trữ này, cần cắm thêm thẻ nhớ. Chức năng Share Folder sẽ cho phép máy mô phỏng sử dụng một thư mục của ổ cứng máy tính trên Windows XP để làm ổ lưu trữ (Storage). d. Kết nối với Windows XP thông qua ActiveSync Đối với thiết bị thật sử dụng hệ điều hành Windows Mobile, để kết nối với PC, cần sử dụng cable USB (hoặc COM, hoặc IR), và trên PC dùng Windows, cần cài đặt chương trình ActiveSync. Trên máy mô phỏng, việc kết nối này sẽ được thực hiện theo các bước sau: - Cài đặt ActiveSync. Sau khi cài đặt, chạy ActiveSync theo đường dẫn Start -> Programs ->Microsoft ActiveSync. Trên Microsoft ActiveSync, nhắp chuột vào menu File -> Connection Settings, xuất hiện hộp thoại Connection Settings. Trên hộp thoại Connection Settings, lựa chọn Allow connections to one of the following, trong danh sách các cổng kết nối, chọn DMA, sau đó nhắp nút OK để kết thúc việc thiết lập connection. - Chạy máy mô phỏng. - Chạy chương trình Device Emulator Manager theo đường dẫn Start -> Programs -> Windows Mobile 6 SDK -> Tools -> Device Emulator Manager. ![]() Device Emulator Manager Trên giao diện của Device Emulator Manager, nhắp đúp vào mục Other để mở các kết nối từ PC đến các Windows Mobile thông qua ActiveSync. Chuột phải vào một kết nối, trên menu chuột phải, chọn Cradle. Khi đó ActiveSync sẽ tự động dò tìm thiết bị kết nối và xuất hiện hộp thoại Synchronization Setup Wizard. Hộp thoại này cho phép cấu hình các chương trình đồng bộ giữa máy tính và thiết bị sử dụng Windows Mobile. Sau khi kết nối, Microsoft ActiveSync sẽ có các lựa chọn Sync để đồng bộ chương trình giữa máy tính và thiết bị sử dụng Windows Mobile. Lựa chọn Explorer để mở ổ lưu trữ trên thiết bị. ![]() ActiveSync sau khi kết nối e. Cài đặt chương trình cho máy mô phỏng. Chương trình cài đặt cho Windows Mobile nói chung có 2 dạng, dạng file exe để chạy trên máy tính và dạng .cab để cài trên Windows Mobile. Với dạng .exe, cần chạy ActiveSync. Sau khi kết nối giữa PC và máy mô phỏng WM6, chạy file .exe đó trên máy tính. Khi đó chương trình cài đặt sẽ tự động kết nối và trên máy mô phỏng sẽ được hỏi cài đặt vào ổ lưu trữ của máy mô phỏng hay Storage. Chú ý mục c. Share Folder để dùng 1 thư mục trên máy tính thật làm Storage trên máy mô phỏng và nên cài các chương trình vào Storage. Với dạng .cab, chỉ cần copy các file .cab vào thư mục chia sẻ. Khi đó trên máy mô phỏng, dùng explorer để mở đến Storage và chạy các file này để cài đặt. Bài viết trên trình bầy những kiến thức cơ bản về việc sử dụng máy mô phỏng cho Windows Mobile V6. Với máy mô phỏng, người dùng có thể thực hiện việc cài đặt, thử nghiệm các tính năng của chương trình mới, trước khi cài đặt lên thiết bị thật. |
| Gửi bởi Hư Trúc Theo Xã Hội Thông Tin [Trờ về] [Thảo luận trong Diễn Đàn] |
do {kiss her; kiss her ++; } while ( refuse );
Wednesday, August 20, 2008
Giả lập Windows Mobile 6.0 trên máy tính
Tuesday, August 19, 2008
How To Repair MySQL Replication
How To Repair MySQL Replication
How To Repair MySQL Replication
Version 1.0
Author: Falko Timme
Last edited 05/29/2008
If you have set up MySQL replication, you probably know this problem: sometimes there are invalid MySQL queries which cause the replication to not work anymore. In this short guide I explain how you can repair the replication on the MySQL slave without the need to set it up from scratch again.
I do not issue any guarantee that this will work for you!
1 Identifying The Problem
To find out whether replication is/is not working and what has caused to stop it, you can take a look at the logs. On Debian, for example, MySQL logs to /var/log/syslog:
grep mysql /var/log/syslog
server1:/home/admin# grep mysql /var/log/syslog
May 29 09:56:08 http2 mysqld[1380]: 080529 9:56:08 [ERROR] Slave: Error 'Table 'mydb.taggregate_temp_1212047760' doesn't exist' on query. Default database: 'mydb'. Query: 'UPDATE thread AS thread,taggregate_temp_1212047760 AS aggregate
May 29 09:56:08 http2 mysqld[1380]: ^ISET thread.views = thread.views + aggregate.views
May 29 09:56:08 http2 mysqld[1380]: ^IWHERE thread.threadid = aggregate.threadid', Error_code: 1146
May 29 09:56:08 http2 mysqld[1380]: 080529 9:56:08 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.001079' position 203015142
server1:/home/admin#
You can see what query caused the error, and at what log position the replication stopped.
To verify that the replication is really not working, log in to MySQL:
mysql -u root -p
On the MySQL shell, run:
mysql> SHOW SLAVE STATUS \G
If one of Slave_IO_Running or Slave_SQL_Running is set to No, then the replication is broken:
mysql> SHOW SLAVE STATUS \G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 1.2.3.4
Master_User: slave_user
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.001079
Read_Master_Log_Pos: 269214454
Relay_Log_File: slave-relay.000130
Relay_Log_Pos: 100125935
Relay_Master_Log_File: mysql-bin.001079
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB: mydb
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 1146
Last_Error: Error 'Table 'mydb.taggregate_temp_1212047760' doesn't exist' on query. Default database: 'mydb'.
Query: 'UPDATE thread AS thread,taggregate_temp_1212047760 AS aggregate
SET thread.views = thread.views + aggregate.views
WHERE thread.threadid = aggregate.threadid'
Skip_Counter: 0
Exec_Master_Log_Pos: 203015142
Relay_Log_Space: 166325247
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
1 row in set (0.00 sec)
mysql>
2 Repairing The Replication
Just to go sure, we stop the slave:
mysql> STOP SLAVE;
Fixing the problem is actually quite easy. We tell the slave to simply skip the invalid SQL query:
mysql> SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
This tells the slave to skip one query (which is the invalid one that caused the replication to stop). If you'd like to skip two queries, you'd use SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 2; instead and so on.
That's it already. Now we can start the slave again...
mysql> START SLAVE;
... and check if replication is working again:
mysql> SHOW SLAVE STATUS \G
mysql> SHOW SLAVE STATUS \G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 1.2.3.4
Master_User: slave_user
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.001079
Read_Master_Log_Pos: 447560366
Relay_Log_File: slave-relay.000130
Relay_Log_Pos: 225644062
Relay_Master_Log_File: mysql-bin.001079
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB: mydb
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 447560366
Relay_Log_Space: 225644062
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
1 row in set (0.00 sec)
mysql>
As you see, both Slave_IO_Running and Slave_SQL_Running are set to Yes now.
Now leave the MySQL shell...
mysql> quit;
... and check the log again:
grep mysql /var/log/syslog
server1:/home/admin# grep mysql /var/log/syslog
May 29 09:56:08 http2 mysqld[1380]: 080529 9:56:08 [ERROR] Slave: Error 'Table 'mydb.taggregate_temp_1212047760' doesn't exist' on query. Default database: 'mydb'. Query: 'UPDATE thread AS thread,taggregate_temp_1212047760 AS aggregate
May 29 09:56:08 http2 mysqld[1380]: ^ISET thread.views = thread.views + aggregate.views
May 29 09:56:08 http2 mysqld[1380]: ^IWHERE thread.threadid = aggregate.threadid', Error_code: 1146
May 29 09:56:08 http2 mysqld[1380]: 080529 9:56:08 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.001079' position 203015142
May 29 11:42:13 http2 mysqld[1380]: 080529 11:42:13 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.001079' at position 203015142, relay log '/var/lib/mysql/slave-relay.000130' position: 100125935
server1:/home/admin#
The last line says that replication has started again, and if you see no errors after that line, everything is ok.
3 Links
- MySQL: http://www.mysql.com
NTP + centos How to
CentOS Linux install and configure NTP to synchronize the system clock
A. You can easily install NTP (Network Time Protocol, a means of transmitting time signals over a computer network) using yum command under Redhat or CentOS/Fedora core Linux.
Procedure
Login as the root user
Type the following command to install ntp
# yum install ntp
Turn on service
# chkconfig ntpd onSynchronize the system clock with 0.pool.ntp.org server:
# ntpdate pool.ntp.orgStart the NTP:
# /etc/init.d/ntpd start
Thursday, August 14, 2008
VTC Shell Scripts
Course Files.rar
Chapter 10 - Advanced Scripting.rar
Chapter 09 - Command-line Parameters.rar
Chapter 08 - Functions.rar
Chapter 07 - Text Processing.rar
Chapter 06 - Loops.rar
Free file hosting from File Den
Chapter 04 - Shell Programming Features.rar
Chapter 03 - Running a Shell Script.rar
Chapter 02 - Your First Shell Script.rar
Chapter 01 - Introduction.rar
Tuesday, August 5, 2008
working with package on Open-Source
Using pkg_tools:
pkg_add -r# fetch from respository and install it
pkg_info # get installed packages's information
pkg_info -L# show everything that are created by pkg's installation
pkg_delete#remove pkg
cd /usr/ports
make search name=#specify the path of pkg's port
......
path=/path/to/port/ #path to pkg's port
......
cd /usr/ports/path/to/port/ #change dir to pkg's port
make install clean
ex: update later
Linux:
Using rpm:
rpm -qa #show installed packages
rpm -ivh
rpm -ql# Show everything that are created by pkg's installation
yum update # Update pkg from internet
yum install#install pkg
yum remove#remove pkg
Using zypper:
zypper search
zypper install
Using apt-get:
update later
Sunday, August 3, 2008
Install VMware Server 1.0.5 on Ubuntu 8.04 “Hardy”
UPDATE: This tutorial has been updated for VMware Server 1.0.6. See the updated instructions here, at How To Install VMware Server 1.0.6 on Ubuntu 8.04.
Now that most of the modern world has upgraded to Ubuntu 8.04 I’ve begun to see comments regarding VMware Server no longer working. You may have used my previous article, Installing VMware Server on Ubuntu 7.10, which has worked great. Now that 8.04 “Hardy” is installed things have become a bit more complicated unfortunately.
The problem is that VMware has not updated their latest versions to make use of the latest kernel, GCC or gnome libraries. So, we’ve got two options.
- Wait for a new VMware release and hope they patch everything.
- Follow the rest of this tutorial and get your hands dirty on the terminal. We can make it work, but we have to hammer it into submission.
So, I’ll assume because you’re still reading that you’ve opted for the hammer into submission option. Let’s get started.
Downloading the Requirements
The first step, of course, is to download VMware Server 1.0.5. You’ll have to agree to the EULA (actually twice. Once before download and once during installation. Remember, VMware is free-as-in-beer but not free-as-in-speech.)
The second step is to install some development tools that we’ll need to get things running. Use the following command or click the package names to install the requirements:
sudo aptitude install build-essential linux-kernel-devel linux-headers-generic xinetd
The third step is to download one more tool to help in the manual build process for VMware Server 1.0.5. What we need is a script which will help in the custom config hosted at Google Code. Download the vmware-any-any-update-116.tgz.
You will also need to generate a serial number to run VMware Server. Visit this link to register and generate the number of codes you might want. Remember to print the codes or write them down because in my experience they are not emailed to you.
OK, at this point we should have all of the requirements, now we can get to work…
Installation and Configuration
Let’s unpack the VMware archive that we downloaded and run the VMware installer. NOTE: After some basic configuration it will ask you to run vmware-config.pl. DO NOT RUN vmware-config.pl, WE ARE NOT READY YET.
tar xf VMware-server-1.0.5
cd vmware-server-distrib
sudo ./vmware-install.pl
When it asks you to run vmware-config.pl you want to answer “no” and this is where the vmware-any-any-116.tgz patch comes in.
cd ..
tar xf vmware-any-any-update-116.tgz
cd vmware-any-any-update116
sudo ./runme.pl
After this runs it will ask you again if you want to run vmware-config.pl. At this point select “yes”.
The Last Step
If you attempt to run vmware at this point you might notice that it spits out some nasty errors and complains at you. There is one more thing we need to setup. (Hey, VMware, if you’re reading this will you please incorporate these fixes into your official download already!)
Basically VMware is missing and complaining about some cairo libraries and gcc. So, the simple fix for this is to point to them by using a symbolic link:
sudo ln -sf /usr/lib/gcc/i486-linux-gnu/4.2.3/libgcc_s.so /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1
sudo ln -sf /usr/lib/libpng12.so.0 /usr/lib/vmware/lib/libpng12.so.0/libpng12.so.0
At this point you should be able to launch vmware and enjoy some virtualization goodness. Please stay tuned for virtualization updates regarding virtualbox and the new KVM!
sources: I want to throw a big thanks to my buddy Igor for helping figure out these tweaks. Check out his blog, with these and other instructions, here.
UPDATE: based on some of the comments below I’ve added the “-f” to the symbolik link options.
I post tutorials very regularly on this site. You may want to consider subscribing to the RSS feed. Or if you'd prefer these tips sent to your inbox you can use Email Subscriptions.
Copy from http://ubuntu-tutorials.com/2008/05/03/install-vmware-server-105-on-ubuntu-804-hardy/
Saturday, August 2, 2008
Virtual box in Ubuntu - Installation
Virtual box in Ubuntu - Installation
March 24, 2008 by taufanlubis
If you need to run other Operating System in Ubuntu, you have to use a Virtual Machine. There are few most used Virtual Machines available on the internet, Virtual Box is one of them.
I like to use Virtual Box because it’s easy to operate.
Installation
From Ubuntu Terminal screen (Applications > Accessories > Terminal), type:
taufanlubis@toshiba:~$ sudo apt-get install virtualbox
Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting virtualbox-ose instead of virtualbox
The following extra packages will be installed:
virtualbox-ose virtualbox-ose-modules-2.6.22-14-generic
Recommended packages:
virtualbox-ose-source
The following NEW packages will be installed:
virtualbox-ose virtualbox-ose-modules-2.6.22-14-generic
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 6012kB of archives.
After unpacking 19.3MB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
virtualbox-ose-modules-2.6.22-14-generic virtualbox-ose
Install these packages without verification [y/N]? y
Get:1 http://archive.ubuntu.com gutsy/universe virtualbox-ose-modules-2.6.22-14-generic 6 [317kB]
Get:2 http://archive.ubuntu.com gutsy/universe virtualbox-ose 1.5.0-dfsg2-1ubuntu3 [5695kB]
Fetched 6012kB in 2m30s (40.0kB/s)
Selecting previously deselected package virtualbox-ose-modules-2.6.22-14-generic.
(Reading database … 152703 files and directories currently installed.)
Unpacking virtualbox-ose-modules-2.6.22-14-generic (from …/virtualbox-ose-modules-2.6.22-14-generic_6_i386.deb) …
Selecting previously deselected package virtualbox-ose.
Unpacking virtualbox-ose (from …/virtualbox-ose_1.5.0-dfsg2-1ubuntu3_i386.deb) …
Setting up virtualbox-ose-modules-2.6.22-14-generic (6) …
Installing new version of config file /etc/init.d/vboxdrv …
* Starting VirtualBox kernel module vboxdrv [ OK ]
Setting up virtualbox-ose (1.5.0-dfsg2-1ubuntu3) …
taufanlubis@toshiba:~$
How to run?
-
Before you run the Virtual Box, you must have a permisson, otherwise you will get an error.
-
Open System > Administration > Users and Groups > Manage Groups.
Choose vboxusers then click Properties.
Mark on your user name and click OK.
Now, your user name has a permission to run Virtual Box.
Now, your user name has a permission to run Virtual Box.
Open Applications > System Tools > Innotek Virtualbox.
Now, you are ready to use Virtual Box.






