Sunday, August 10, 2008

อนาคตของประเทศช่างน่าเป็นห่วงยิ่งนัก

เฮ้อ ...ยังไม่ได้นอน เพราะต้องนั่งช่วยปั่นงาน Project ให้ น้อง ๆ ของเพื่อน ก็เลยไม่นอนเห่อ ๆ เป็นอุทาหรสอนใจไปอีกครั้ง ว่า อย่าไปทำแบบนี้อีก เพราะว่าทำแล้วไม่มีใครได้อะไร ไอ้ที่พูดว่า ห่วงอนาคตของประเทศก็คือ ทำไม Project ของนักศึกษาทำไมไม่ทำเอง ไอ้ Project นี้มันก็ไม่ยากอะไร อีกอย่างทำงานกลุ่มด้วย ตั้ง 7 คน แล้วทำไมไม่ช่วยกันศึกษาหาข้อมูล มาช่วยกันทำ Project ให้เสร็จ internet ก็มี ทำไมไม่ช่วยกันทำ หรือว่าถึงขนาดไม่รู้จรืง ๆ ไม่มีความรู้ หรือว่า ทำอะไรไม่เป็นก็ควรกระตือรือล้นที่จะศึกษา กันบ้าง ไม่ใช่อยู่ดี ๆ ทำไม่ได้เอามาให้เราทำซะงั้น แล้วอย่างนี้ มึงจะลงเรียนวิชานี้ทำไม คนที่ทำให้ ก็เมื่อย คนเจ้าของงานก็อยากทำให้เสร็จ ๆ ไป โดยไม่คำนึงถึงว่า กูมาเรียนเพื่อเอาความรู้ แทนที่จะศึกษาวิชาที่เรียน แล้วก็กระตือรือล้นที่จะศึกษาให้มันลึกซึ้ง เพราะทางมหาวิทยาลัยเค้าก็สอนแค่แบบพื้นฐาน ให้นักศึกษาไปศึกษาเพิ่มเติม ชื่อก็บอกอยู่แล้วว่านักศึกษา กลับให้คนที่ไม่ได้เรียนมาทำให้ซะงั้น ไอ้ห่า..แล้วอย่างนี้ เมิงจะได้อะไร ตอนส่ง project แล้วจะ present กันยังไง แล้วถ้าอาจารย์ถามว่าอันนี้อันโน้นคืออะไร จะตอบได้ไหม ถ้าตอบไม่ได้จะทำยังไง เวลาจะไปทำงานจะทำอะไรเป็น เค้าจะรับไปทำงานรึป่าว บางที่งานอาจจะยากกว่าที่เรียนมาก็ได้ ใครจะไปรู้ จบไป ก็สงสารมหาวิทยาลัย ที่โดนด่า ว่า เด็กมอนี้แม่งทำห่าอะไรไม่เป็นเลย ความกระตือรือล้นก็ไม่มี อึดอย่างเดียว นักศึกษา IT ปี 3 - 4 แล้ว แทนที่จะมีความรู้เรื่อง Programming บ้าง แต่นี่ไม่มีเลย แล้วไม่ใช่น้อย ๆ คนที่เป็นแบบนี้เป็นเยอะทีเดียว เรียนไปวัน ๆ ไม่ได้มีความสนใจในเรื่องที่เรียนโดยแม้แต่น้อย ถ้าเรียนและก็สนใจที่จะศึกษามัน มันก็คงทำได้ในไม้ช้า อีกอย่างมีนักศึกษาสาขาที่เกี่ยวข้องกับ IT เนี่ยไม่มีความรู้อ่ะไรเลยเกี่ยวกับ Computer และ IT ต่าง ๆ เช่น programming ก็ไม่ได้ Network ก็ไม่เป็น database ก็ไม่ชอบ graphic animation ก็ไม่เป็น Hardware ก็ไม่ได้ แล้วก็จะจบแล้ว จะต้องมานั่งคิดค้นหาตัวเองว่าทำอะไรเป็นบ้าง แล้วก็มานั่งหัดนั่งทำ ตอนจบแล้ว แทนที่จะใช้ช่วงเวลาเรียนในการศึกษาหาความรู้กัน กลับต้องมาใช้ช่วงเวลาที่จะต้องมาหางานมาใช้ในการศึกษา หาความรู้กัน แล้วช่วงที่เรียนทำห่าอะไรกันอยู่ เป็นแบบนี้หลายคนมาก ทำห่าอะไรไม่เป็นเลย ยังจะเสือกอยากได้ที่ทำงานดี ๆ เงินเยอะ ๆ และก็สบาย ๆ อีกเอ้า เอาเข้าไป ไอ้พวกนี้แหละที่คิดแบบ มองแคบ คิดใกล้ แต่ใฝ่สูง แต่บางคนก็ใฝ่ต่ำไปด้วย ครบสูตรจริง ๆ

ระดับการศึกษาของประเทศมันกำลังแย่ลงแล้วหรือ

จำไว้ว่าจะไม่ทำ Project ให้นักศึกษาอีกไม่ว่าจะมาจ้างหรืออะไรทั้งนั้นจะไม่ทำให้ ถ้า F ก็ F ไปเลยจะได้ลงใหม่ จะได้เรียนใหม่ จะได้ตั้งใจเรียนตั้งใจทำ ตั้งใจศึกษาค้นคว้าให้มากขึ้น เกรด ออกมาจะได้ดี ๆ สมกับความรู้ที่มีในหัว จะได้เอาความรู้ที่ทีอยู่ในหัวมึงเนี่ยไปพัฒนาประเทศชาติได้บ้าง ไม่ใช่รอให้คนอื่นมาพัฒนาสมองตัวเอง ตัวเองก็ควรที่จะพัฒนาตัวเองกันบ้าง

ขอความกรุณาคนที่ทำแบบนี้อยู่ กรุณาหยุดเถอะครับ ไม่ว่าจะเป็นการช่วยเหลือ ญาติพี่น้องผองเพื่อน ที่อยู่ดี ๆ ก็เอามาให้ทำให้เลยโดยไม่มีความรู้อะไรเลยเกี่ยวกับงานของตัวเอง ไม่ศึกษามาก่อนจนสุดความสามารถจริง ๆ ช่างแม่งมันอย่างไปสนใจ ปล่อยให้มัน FFFF ไปเลย จะได้จำ ๆ ให้มันได้ใช้สมองในการเรียรู้บ้างอย่ามัวแต่ให้คนอื่นยัดให้ หรือไม่ก็ re-try ไปเลย ออกไปเลี้ยงควายที่บ้านไป

ต้องขออภัยที่ใช้ถ้อยคำรุนแรงและไม่สุภาพไปหน่อย ก็ให้กำลังใจคนที่กำลังจะหยุดพฤติกรรมแบบนี้แล้วหันมาศึกษาค้นคว้าในสายวิชาชีพของตัวเองอย่างจริงจัง ทั้งผู้ที่เป็นนักศึกษาหรือว่าจบแล้วที่ยังหาตัวเองไม่เจอ ก็ค่อย ๆ ศึกษาไปนะครับ เวลามันก็ขึ้นอยู่กับคุณแล้วแหละ ชีวิตของคุณ คุณเป็นคนกำหนด ไม่มีใครควบคุมชีวิตคุณอีกต่อไปแล้ว

Friday, December 14, 2007

Thank you all SSI-STEEL

At last... Cooperative education has ended at Sahaviriya Steel Industry Public Company Limited in assistant Web Programmer position. Thanks Mr.Kumpeera Kulpaibul and Mrs.Poranee Wannasiri to interview and gave opportunity to me and this is an important person to gave me an knowledge and experience P'Kai,or Ditsayakul Saeung, job supervisor. Please all good thing be come to all ITO and SSI-STEEL. Happy New Year 2008.

Tuesday, November 27, 2007

Simple cut vulgar language with VB.Net

Hi all this article will show you how to cut vulgar language by using Visual Basic.net. It's very simple to do. And you can modify it for your new version. And you can use it in webboard using asp.net. Now Let' see.


Public Class CutVulgarWord
Private VulgarWord() As String = {"ashole", "a s h o l e", "a.s.h.o.l.e", "bitch", "b i t c h", "b.i.t.c.h", "shit", "s h i t", "s.h.i.t", "fuck", "dick", "f u c k", "d i c k", "f.u.c.k", "d.i.c.k", "มึง", "มึ ง", "กู", "ควย", "ค ว ย", "ค.ว.ย", "คอ วอ ยอ", "คอ-วอ-ยอ", "ปี้", "เหี้ย", "เฮี้ย", "ชาติหมา", "ชาดหมา", "ช า ด ห ม า", "ช.า.ด.ห.ม.า", "ช า ติ ห ม า", "ช.า.ติ.ห.ม.า", "ไอ้", "สัดหมา", "สัด", "เย็ด","สันดาน", "แม่ง", "ระยำ", "ส้นตีน"}
Private ReplaceString As String = "xxx"
Private Msg As String
Private CleanWord As String

Public Function CutAndReplace(ByVal text As String) As String
Msg = text

For I As Integer = 0 To VulgarWord.Length - 1
Msg = Replace(Msg, "ไอ้", "คุณ")
Msg = Replace(Msg, ",มึง", "คุณ")
Msg = Replace(Msg, ",มึ ง", "คุณ")
Msg = Replace(Msg, VulgarWord(I), ReplaceString)

Next I
CleanWord = Msg
Return CleanWord
End Function

End Class
Now Let see example ...

5555 + Bye Bye

Code by ETCPE9...

Wednesday, November 21, 2007

Manipulation Database With Visual Basic.Net




Hi... This article will show you how to manipulate database with vb.net and sqlserver 2000. I'll Create some class to do something in my database such as get some data , insert data, update date , delete data and another interesting topics. Now Let's go!




Something is require to do with this article you must have Visual Basic.net 2003 or newer and sql server 2000 or newer. And you must create your own database and assign or create permission for user for test this.

Follow this step..
1. Create table name MyFriend and following this fields(Id (int 4) Identity Yes PK NOT NULL, Name(nvarchar 50) NOT NULL, NickName(nvarchar 50) NOT NULL, EMail(varchar 50), Address(nvarchar 100), TelNum(numeric 9)) or your own table .
2. Create new project with windows application or Web application that you want to do but I use Web Application .
3. Add class to your project name "Database" or up to you.
4. Following this code.

'class Database

Imports System.Data.SqlClient
Public Class Database
Private strDatabaseName As String
Private strConnectionString As String = "Server=(local);uid=admin;pwd=1234;database="
' Connection String format "Server=(local);uid=username;pwd=password;database=dbname" for sql server.

Public Function ExecuteCommand(ByVal strSql As String) As Integer
Dim Connect As SqlConnection = New SqlConnection
Dim Command As SqlCommand = New SqlCommand
Dim RowAffect As Integer
Try
Connect.ConnectionString = ConnectionString + DatabaseName
If Connect.State = ConnectionState.Open Then
Connect.Close()
End If
Connect.Open()
Command.CommandType = CommandType.Text
Command.CommandText = strSql
Command.Connection = Connect
RowAffect = Command.ExecuteNonQuery()
Catch ex As Exception
RowAffect = -1
Finally
Connect.Close()
End Try
Return RowAffect
End Function

Public Property DatabaseName() As String
Get
Return strDatabaseName
End Get
Set(ByVal Value As String)
strDatabaseName = Value
End Set
End Property

Public Property ConnectionString() As String
Get
Return strConnectionString + DatabaseName
End Get
Set(ByVal Value As String)
strConnectionString = Value
End Set
End Property
End Class


5. Explanation this is a class to connection to database and execute sqlcommand.
6. Add new class to manage database that you want to do something with database.
7. Following this code.


Imports System.Data.SqlClient
Public Class DBManage
Public Function GetDataTable(ByVal strSql As String, ByVal strDBName As String) As DataTable
Dim db As Database = New Database
Dim strConnection As String
db.DatabaseName = strDBName
strConnection = db.ConnectionString
Dim DA As New SqlDataAdapter(strSql, strConnection)
Dim DS As New DataSet
On Error Resume Next
DA.Fill(DS)
Dim DT As DataTable = DS.Tables(0)
Return DT
End Function

Public Function GetDataColumn(ByVal strSql As String, ByVal strDBName As String, ByVal ColName As String) As String
Dim db As Database = New Database
Dim strConnection As String
db.DatabaseName = strDBName
strConnection = db.ConnectionString
Dim DA As New SqlDataAdapter(strSql, strConnection)
Dim DS As New DataSet
On Error Resume Next
DA.Fill(DS)
Dim DT As DataTable = DS.Tables(0)
If DT.Rows.Count > 0 Then
Dim Dr As DataRow = DT.Rows(0)
Return Dr(ColName)
Else
Return "NO"
End If
End Function

Public Function ExecuteInsert(ByVal strSql As String, ByVal strDBName As String) As String
Dim db As Database = New Database
Dim strConnection As String
db.DatabaseName = strDBName
strConnection = db.ConnectionString
Dim RowAffect As Integer
RowAffect = db.ExecuteCommand(strSql)
If RowAffect > 0 Then
Return "Add data complete"
Else
Return "Add data incomplete"
End If
End Function

Public Function ExecuteUpdate(ByVal strSql As String, ByVal strDBName As String) As String
Dim db As Database = New Database
Dim strConnection As String
db.DatabaseName = strDBName
strConnection = db.ConnectionString
Dim RowAffect As Integer
RowAffect = db.ExecuteCommand(strSql)
If RowAffect > 0 Then
Return "Update data complete"
Else
Return "Update data incomplete"
End If
End Function

Public Function ExecuteDelete(ByVal strSql As String, ByVal strDBName As String) As String
Dim db As Database = New Database
Dim strConnection As String
db.DatabaseName = strDBName
strConnection = db.ConnectionString
Dim RowAffect As Integer
RowAffect = db.ExecuteCommand(strSql)
If RowAffect > 0 Then
Return "Delete data complete"
Else
Return "Delete data incomplete"
End If
End Function
End Class

8. Time for testing. Create object of DBManage to using and do something for test my database class.
9. Following this code.
        Dim db As DBManage = New DBManage
Dim Dt As DataTable
Dt = db.GetDataTable("select * from MyFriend", "cpe9")
DataGrid1.DataSource = Dt
DataGrid1.DataBind()

10. Result...



11. Finally you will see data is shown.
12. If you don't understand something in this article and you need some explanation for this please post comment to ask question and I'll give you good explanation and answer for you.
13. If my article have something wrong you can post comment for where is wrong.
14. Next version will comming soon.
15. Thank you for read my article... ^-^..

Code by ETCPE9