Categories

Archives

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

เครื่องมือในการพัฒนาโปรแกรมบน Android

สรุปขั้นตอน เริ่มต้นเขียน android application

 

  1. Download โปรแกรม Eclipse – เป็นโปรแกรมที่เขียน android application แนะนำให้ใช้ตัวนี้ เพราะว่าคู่มือที่ google จัดทำ จะใช้ตัวนี้เกือบทั้งหมด
  2. Download JDK – เป็น Java environment สำหรับ developer (คนที่มี JRE ในเครื่องแล้ว ไม่พอนะครับ)
  3. Download Google SDK – เป็น environment ต่างๆ ที่ google เค้าจัดมาให้ รวมไปถึงตัว emulator ต่างๆด้วย
  4. ติดตั้งตัวเสริม ให้กับ Eclipse – เพื่อให้สามารถทำงานเชื่อมต่อกับ Google SDK ได้
  5. เริ่มเขียนโปรแกรมแรก ในชีวิต

ทั้งนี้ ช่วงท้าย จะมีแถมให้สองเรื่อง คือ การทำให้ emulator (ระบบจำลองโทรศัพท์ android) ที่ต่ำกว่า 2.2 สามารถอ่านตัวหนังสือภาษาไทยได้ กับอีกเรื่องคือการเอาตัวติดตั้ง ไปติดตั้งที่ android เครื่องจริง ซึ่ง ก่อนที่จะเริ่ม ผมแนะนำว่า ให้ใช้ internet ที่มีความเร็วหน่อยนะครับ เพราะว่าทั้งหมดนี้ ขนาดมันใหญ่มาก (น่าจะเกิน 2 GB) รวมทั้ง harddisk ที่จะใช้เก็บก็ด้วย แนะนำให้ใช้ drive ที่เหลือพื้นที่เกิน 5 GB ก็น่าจะอยู่ครับ ถ้าไม่ได้กระหน่ำเขียนอะไรเยอะแยะนะครับ

 

ที่มา: http://meewebfree.com/site/android/300-build-android-application-from-scratch

ทำให้ teamspeak ใช้ฐานข้อมูล mysql

I’ll use server terminal for all such commands. You should execute them from local server terminal or SSH connection such as OpenSSH server.

I’ll use bold font for commands, red bolded font for informations that needs edit to your preferences and orange bolded font for temporary things such as download address.

Firstly we need to download latest server package for linux from here, remember that it needs to match your server architecture – use i386 (x86) for 32-bit and amd64 for 64-bit. Also it would be cool to start teamspeak process as another user, just for server security. So… let’s do it.

Code:
root@archi:~# adduser teamspeak
root@archi:~# su teamspeak
teamspeak@archi:/root$ cd ~
teamspeak@archi:~$ wget http://teamspeak.gameserver.gamed.de/ts3/releases/3.0.6.1/teamspeak3-server_linux-amd64-3.0.6.1.tar.gz
teamspeak@archi:~$ tar xvf teamspeak3-server_linux-amd64-3.0.6.1.tar.gz
teamspeak@archi:~$ mv teamspeak3-server_linux-amd64 teamspeak
teamspeak@archi:~$ cd teamspeak
teamspeak@archi:~/teamspeak$ chmod +X ts3server_linux_amd64
teamspeak@archi:~/teamspeak$ chmod +X ts3server_minimal_runscript.sh
teamspeak@archi:~/teamspeak$ nano ts3server.ini

In last command you can use your favourite text editor, I used nano.

Now paste below text to your text editor and save it as ts3server.ini.
You can edit red bolded text to your preferences.

machine_id=
default_voice_port=9987
voice_ip=0.0.0.0
liscensepath=
filetransfer_port=30033
filetransfer_ip=0.0.0.0
query_port=10011
query_ip=0.0.0.0
dbplugin=ts3db_mysql
dbpluginparameter=ts3db_mysql.ini
dbsqlpath=sql/
dbsqlcreatepath=create_mysql/
logpath=logs
logquerycommands=0

Okey. Now we need mysql-server on our machine. If you already have MySQL server on other machine and you want to use it instead – skip this part and remember to change host and port in ts3db_mysql.ini. As part of this tutorial we’ll set up local mysql server.

Code:
teamspeak@archi:~/teamspeak$ su root
root@archi:/home/teamspeak/teamspeak# cd ~
root@archi:~# apt-get update && apt-get install mysql-server

You’ll be prompted for root password for MySQL server. This is NOT a password for your teamspeak mysql connection. We’ll use non-root mysql account for teamspeak.

Okay, MySQL Server should be running. Next…

Code:
root@archi:~# mysql -h localhost -u root -p
mysql> create database teamspeak;
mysql> grant ALL on teamspeak.* to teamspeak@localhost identified by 'your_password_for_mysql_connection';
mysql> exit

Let’s continue…

Code:
root@archi:~# su teamspeak
teamspeak@archi:/root$ cd ~/teamspeak
teamspeak@archi:~/teamspeak$ nano ts3db_mysql.ini

Now paste below text to your text editor and save it as ts3db_mysql.ini.

[config]
host=127.0.0.1
port=3306
username=teamspeak
password=your_password_for_mysql_connection
database=teamspeak
socket=

Okay. We’re nearly ready to go. Last (and probably hardest) part is to set up right libraries for teamspeak. Firstly let’s check actual status…

Code:
teamspeak@archi:~/teamspeak$ ldd libts3db_mysql.so

You should get similar output:

linux-vdso.so.1 => (0x00007fff8a7c8000)
libmysqlclient.so.15 => not found
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f091a950000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f091a6cd000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f091a4b7000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f091a130000)
/lib64/ld-linux-x86-64.so.2 (0x00007f091ae65000)

As we can see it’s missing libmysqlclient15 library. There are 2 ways to fix it. First one is just copying this library from older linux distros and paste it and second way is just to install missing package. We’ll use second way because it’s much easier.

Package is named libmysqlclient15off and it’s unavailable to install for latest distros. We need to download and install it manualy.

There are 2 main versions of this package. Ubuntu version and Debian version. For some reason Ubuntu version of libmysqlclient15off works much better on my both machines – ubuntu and debian. I’ll attach working links:

Ubuntu Hardy [5.0.96] (i386) – http://security.ubuntu.com/ubuntu/po…untu3_i386.deb
Ubuntu Hardy [5.0.96] (amd64) – http://security.ubuntu.com/ubuntu/po…ntu3_amd64.deb
Debian Lenny [5.0.51a] (i386) – http://archive.debian.org/debian/poo…enny5_i386.deb
Debian Lenny [5.0.51a] (amd64) – http://archive.debian.org/debian/poo…nny5_amd64.deb

Warning! libmysqlclient15off needs installed package mysql-common. If you have working MySQL Server on your machine it has been installed automatically. If you have remote MySQL Server install it using apt-get install mysql-common running as root.

If for some reason Ubuntu’s version won’t work for you just install Debian’s one. I’ll install Ubuntu’s amd64 version for my machine:

Code:
teamspeak@archi:~/teamspeak$ su root
root@archi:/home/teamspeak/teamspeak# cd ~
root@archi:~# wget http://security.ubuntu.com/ubuntu/pool/main/m/mysql-dfsg-5.0/libmysqlclient15off_5.0.96-0ubuntu3_amd64.deb
root@archi:~# dpkg -i libmysqlclient15off_5.0.96-0ubuntu3_amd64.deb

And that’s it! We’ve installed missing library for teamspeak. Let’s check if everything works fine:

Code:
root@archi:~# su teamspeak
teamspeak@archi:/root$ cd ~/teamspeak
teamspeak@archi:~/teamspeak$ ldd libts3db_mysql.so

Output:

linux-vdso.so.1 => (0x00007fff4b5f1000)
libmysqlclient.so.15 => /usr/lib/libmysqlclient.so.15 (0x00007f27ece0b000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f27ecb04000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f27ec881000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f27ec66b000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f27ec2e4000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f27ec0c7000)
libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f27ebe90000)
libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f27ebc78000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f27eba60000)

Yep, It works just fine.

This step is optional. You don’t need screen software to run TeamSpeak but it can help you out if you like to have things running in seperate windows like myself. Screen is useful when we’re leaving our server in a background. If you wish to attach to the output just typescreen -r as user teamspeak. If you want to deattach it just hit CTRL+A+D.

Code:
teamspeak@archi:~/teamspeak$ su root
root@archi:/home/teamspeak/teamspeak# apt-get install screen

And let’s turn on our server…

Code:
root@archi:/home/teamspeak/teamspeak# cd ~
root@archi:~# su teamspeak -c 'screen -d -m -S ts3 /home/teamspeak/teamspeak/ts3server_minimal_runscript.sh inifile=ts3server.ini'

If you didn’t install screen use this command:

Code:
root@archi:/home/teamspeak/teamspeak# cd ~
root@archi:~# su teamspeak -c '/home/teamspeak/teamspeak/ts3server_minimal_runscript.sh inifile=ts3server.ini'

 

ที่มา: http://forum.teamspeak.com/showthread.php/74883-TUTORIAL-Temaspeak3-Server-w-MySQL-Databse-on-Debian-Ubuntu

สายอากาศ

http://www.hamsiam.com/smf/index.php?topic=125804.0

http://www.hamsiam.com/smf/index.php?topic=131291.0

 

http://www.hamsiam.com/smf/index.php?topic=46353.0

 

เมาท์แม่เหล็ก

http://www.hamsiam.com/smf/index.php?topic=28798.0

http://www.hamsiam.com/smf/index.php?topic=132740.0

 

เข้าหัวไฟเบอร์แบบหัวบีบ (Impact Tools)

หาหัวแบบนี้ในบ้านเราอยากหน่อย

http://www.youtube.com/watch?v=-0q6dBkBwJQ&playnext=1&list=PL93AE4123443EA8B0&feature=results_main

 

สอนการเข้าหัวไฟเบอร์แบบ E-Proxy

http://www.youtube.com/watch?v=OosMQHQlY40&feature=related

โปรแกรมที่เป็นแถบๆ เหมือน MAC

www.rocketdock.com

สร้าง Radius Account แบบหมดอายุนับจากวันแรกที่ใช้งาน

Hi,

I’ve been experimenting with freeRadius for 2 weeks now, but I still havent got it to do the following:

I need to expire a specific time (could be different for each account) after their first login. This time is listed in the MySQL database under the attribute “Max-All-Session” in seconds. The server has a MySQL backend which is working correctly.

I’ve tried the following methodes (they will be described in detail below):

  • sqlcounter
  • expireonlogin
  • allowedperiod

Unfortunately non of the above are working correctly. I will explain them in detail now:

sqlcounter
This is a basic module built in the “stock” version of freeradius. It calculated the maximum allowed time for an user account. Unfortunately it comes with 2 problems. The first (which sounds like a bug) is that on an account’s first login it always shows (and calculates) a incorrect time of more the 400 hours remaining.
Secondly it stops counting when a user logs out, or time-outs (disconnects), so if a user re-connects it will continue at the remaining time the user had when it disconnected.

sqlcounter expire_on_login
I found this code on the net. It’s supposed to calculate the remaining time and then write it as a Expire attribute in the database.
I included this code in the sql.conf file and added “expire_on_login” to the authorize section of the sites-available/default file.
I didn’t see this script make any changes to the database.

sqlcounter accessperiod
I also found this script on the web: here and here. I included that code in the modules{} section, and added “accessperiod” to the sites-available/default file in the authorize section.
This code however did do something, it created a Expire record in the database, but one month from the first login, and not even exactly, but exactly at midnight, always!

I’ve been google-ing non-stop for days now, with the above result. I’d really appreciate any help. If you want to do some anonymously (private) you can PM, or add me on MSN, or Skype.

# -*- text -*-
#
#  $Id$

#
#  Set an account to expire T seconds after first login.
#  Requires the Expire-After attribute to be set, in seconds.
#  You may need to edit raddb/dictionary to add the Expire-After
#  attribute.
#
#  This example is for MySQL.  Other SQL variants should be similar.
#
sqlcounter expire_on_login {
	counter-name = Expire-After-Initial-Login
	check-name = Expire-After
	sqlmod-inst = sql
	key = User-Name
	reset = never
	query = "SELECT TIME_TO_SEC(TIMEDIFF(NOW(), acctstarttime)) \
		 FROM radacct \
		 WHERE UserName='%{%k}' \
		 ORDER BY acctstarttime \
		 LIMIT 1;"
}

ที่มา: http://www.wjunction.com/92-development-area/110059-help-radius-need-accounts-expire-specific-time-after-first-login.html

เทคโนโลยี FTTx – EPON/GPON/EPON

http://www.thefoa.org/tech/ref/appln/FTTH-PON.html

http://info300.net/pmartin2/breif1.html

โครงการอบรมฟรี โดย SIPA

https://sites.google.com/site/ossfasttrack/home

ข้อมูล CakePHP ภาษาไทย

http://www.cakephp.in.th/

Page 30 of 62« First...1020...2829303132...405060...Last »