បង្កើត​មេរៀន​មួយ​សម្រាប់​ផាយខ្មែរនឹង​ទទួល​បាន​អាវ​យឺត​ផាយ​ខ្មែរមួយ​ដោយ​ឥតគិតថ្លៃ

ខែតុលា 15, 2010 បញ្ចេញមតិ

អ្នកបង្កើតក្រុម​ផាយ​ខ្មែរ គាត់​បាន​ផ្ដល់​ឱកាស​មួយ​ដើម្បី​អោយ​បង​ប្អូន​រាល់​គ្នា​បង្កើត​ជា​មេរៀន​មួយ​អោយ ផាយខ្មែរ ដើម្បី​យក​មក​ប្រកាស​នៅ​ក្នុង​ប្លុក​ផាយ​ខ្មែរមួយ​នេះ ដើម្បី​ទុក​ជា​មេរៀន​មួយ​សម្រាប់​ចែក​រំលែក​អោយ​បង​ប្អូន​ផ្សេងៗ​ទៀត​រៀន ហើយ​រង្វាន់​លើក​ទឹក​ចិត្ត​នោះ​គឺ អាវ​យឺត​របស់​ក្រុម​ផាយ​ខ្មែរមួយ។ ហើយ​ឯកសារ​ដែលបង​ប្អូនបាន​ធ្វើ​នោះ នឹង​ដាក់​ឈ្មោះ​របស់​បង​ប្អូន ដោយយើង​មិន​យក​ធ្វើជា​កម្មសិទ្ធិ​របស់​ក្រុម​យើងទេ។ ហើយ​យើង​យក​តែ​ម្នាក់​តែ​ប៉ុណ្ណោះ។

លក្ខខណ្ឌ​ក្នុង​ការ​សរសេរ​មេរៀន និង​ការ​បញ្ជូន​មក​យើង៖

  • ១.ត្រូវ​សរសេរអត្ថបទ​ពន្យល់​ជា​ភាសាខ្មែរ
  • ២.អាច​ជា​មេរៀន​បង្កើត​កម្មវិធី ជា​ភាសា​ខ្មែរ
  • ៣.អត្ថបទ​ពន្យល់​ត្រូវ​តែ​ងាយ​យល់
  • ៤.អាច​ជា​មេរៀន​ដែលបក​ប្រែ​ពីឯកសារ​ណាផ្សេង
  • ៥.មេរៀន​ត្រូវ​តែជា​មេរៀន​និយាយ​ពី​ការ​បង្កើត​កម្មវិធីដោយលាយកូដ Python ជាមួយ​នឹងម៉ូឌុល​ផ្សេងៗ​ទៀត​របស់​ផាយ​ថុន ដូច​ជា​ម៉ូឌុល wxPython ជាដើម។
  • ៦.ឯកសារ​មេរៀន ត្រូវ​បម្លែង​ទៅ​ជា​ប្រភេទ *.pdf

ឯកសារ​ដែល​ផ្ញើ​មក​យើង ពួក​យើង​នឹង​ពិនិត្យ​មើល​ថា តើ​មេរៀន​មួយ​ណា​ល្អ? ពេលនោះ​យើង​នឹង​យក​មក​ផ្សាយ​នៅ​លើ​ប្លុក​ផាយ​ខ្មែរ​នេះ ហើយ​នឹង​ដាក់​ឈ្មោះ របស់​អ្នក​ផងដែរ។ សូម​ផ្ញើ​មក​កាន់​មែល ly.sitthykun@gmail.com or pythonkhmer@gmail.com ។

សង្ឃឹម​ថា​បង​ប្អូន​នឹង​ចូលរួមក្នុង​ការ​ប្រកួតប្រជែង​នេះ ;-)

ចំណាត់ក្រុម ៖លំហាត់ផាយថុន

ប្តូរឈ្មោះដូមែន និង ហូស្ទីង

ខែតុលា 10, 2010 មតិ 7

ដោយយល់តាមការរីកចំរើននៃសកម្មភាព និង​​តំរូវការបន្ថែមរបស់ក្រុម។ ដូចនេះយើងត្រូវតែប្រាស់ប្តូរខ្លះដួចជា ប្តូរឈ្មោះដែន និង ទីតាំងទំហំ។
– ឈ្មោះដូមែន (Domain Name): ធ្វើឲ្យងាយចាំជាងមុន​ និង ល្អជាងមុន។
– ហូស្ទីង (Hosting): ធ្វើឲ្យងាយទុកឯកសារជាងមុន។

ខ្ញុំចង់បាន ឈ្មោះដូមែន (Domain Name)ជា pykhmer.org និង ហូស្ទីង/ទំហំផ្ទុក(Hosting) ធំជាង ៥​ចី ឡើង រឺ​ មិនកំណត់។
តើអ្នកយល់ដូចម្តេច??

ចំណាត់ក្រុម ៖សកម្មភាពក្រុម

Pykhmer join Phnom Penh Hackerspace

ខែតុលា 6, 2010 មតិ ១

Hi guys,

Do any of you wish that it could be BarCamp everyday? If so then your
dream will be coming true. A group of us are in the process of
establishing the Phnom Penh Hackerspace.

HACKERSPACE F.A.Q

What is a hacker?

The hacker explores the intersection of art and science in an
insatiable quest to understand and shape the world around him/her
(hackers.org)

What is a hackerspace?

A hackerspace is a location where people with common interests,
usually in computers, technology, or digital or electronic art can
meet, socialise and/or collaborate. A hackerspace can be viewed as an
open community lab incorporating elements of machine shops, workshops
and/or studios where hackers can come together to share resources and
knowledge to build and make things.

Who type of hackers go to Hackerspaces?

Code hackers
Art hackers
Social media hackers
Electronics hackers
Food hackers
Science hackers
Business hackers

What kind of things will happen at Hackerspace?

Tech Talks (like barcamp)
Group Projects (e.g. launching Cambodia’s first spaceship, building
robots, hack days, hackathons)
Group Meetings (e.g. PPLUG, Joomla Users Group, ShareVision)
Business Start-Ups (e.g. Members coming together and starting
businesses)
Parites & Social Events

Who pays for the Hackerspace?

Hackerspaces are self funded by their members. Each member pays a
monthly fee to be a member and this money is used to cover costs and
constantly improve the Hackerspace.

What benefits will I get as a Hackerspace member?

You will get -
to meet and socialise with like minded people.
to know influential people in the Cambodia tech scene
a cool place where you can go 24/7
a place where you can work and be productive
a location with excellent facilities (fast internet, cold aircon,
kitchen)
a place with no unwanted distractions (parents, wife, children etc)
a place where you can learn from people with different skills and
interests
a place that has the equipment needed to build successful projects

Where can I get more information about hackerspaces?

http://en.wikipedia.org/wiki/Hackerspace

http://hackerspaces.org/wiki/

http://www.google.com/images?q=hackerspace

END F.A.Q

Ok hopefully you now all know what a hackerspace is, and hopefully
some of you will be excited about the fact that we’re going to have
one in Phnom Penh.

If you would like to join in with the organisation of the Phnom Penh
hackerspace than please come and join our new mailing list and wiki:

http://hackerspacepp.wikispaces.com

http://groups.google.com/group/hackerspace-phnom-penh

Cheers,

Chris

សកម្មភាពនៅ Barcamp Phnom Penh 2010

ខែតុលា 3, 2010 មតិ ១

ពូកយើងមានរយពេលខ្លីក្នុងការរៀបចំខ្លួន ប៉ុន្តែពូកយើងនូវតែអាចធ្វើបាន។ ខ្ញុំសង្ឃឹមថាវេទិកាលើកក្រោយយើងនឹងបានជោគជ័យជាងនេះ សូមអរគុណសមាជិកក្នុងក្រុមទាំងអស់ និង អ្នកចូលរួមស្តាប់ការ។
ផាយខ្មែរនឹងប្រឹងប្រែងបន្ថែមទៀត ខ្មែរដើម្បីខ្មែរ។

ចំណាត់ក្រុម ៖សកម្មភាពក្រុម

សួរស្ដី BarCamp PhnomPenh ២០១០

ខែកញ្ញា 13, 2010 បញ្ចេញមតិ

សួរស្ដីអ្នកទាំងអសគ្នា !
ផាយសាន់វាជាភាសារងាយស្រួលរៀនជាងអ្នកគិតទៅទៀត។
អ្នកអាចចាប់ផ្ដើមដោយគ្រាន់តែទាញយករួច រួចដំឡើង
http://python.org/download/ សួមជ្រើសរើសជំនាន់ថ្មី Python 3.1.2.
ព្រោះវាដំណើរល្អជាមួយតួរអក្សរខ្មែរ
ក្នុងដំនើរ អនុវត្តកូដ វាស្រដៀងនឹង ភាសា ចាវ៉ា (JAVA)ដែរ

ឧទាហរណ៏ក្រោយពីបានដំឡើង
​​-វិនឌូ (windows)
​​ ចូល Start->Programs ->python->Python(command line)
អ្នកវាយឃ្លាបញ្ជា
បន្ទាប់ពីសញ្ញា

>>> print "Hello BarCamp Phnom Penh"
Hello BarCamp Phnom Penh
>>>

-Linux(Python ភ្ជាប់មកជាស្រេច) វាយ ពាក្សថា python (console screen)
>>> print 'Hello BarCamp 3 '

អ្នកអាចប្រើ IDE ក៏បានដែរ មានគ្រប់ទាំងអស់

ដើម្បីលំអិតបន្ថែម

http://groups.google.com/group/pykhmer?hl=en

http://python.org/doc/

http://pykhmer.wordpress.com/

http://google.com

ចំណាត់ក្រុម ៖ស្វែងយល់ពីផាយថុន

the basics of Python to beginner and intermediate programmers

ខែកញ្ញា 3, 2010 មតិ 2

Programmers with experience in other languages who want a fast hands-on introduction to Python.So all the member please following the milestone step by step .

Beginner

  • Numbers and operators
  • Strings – immutability, operators, methods, functions, and formatting
  • Introspection/Discovery
  • Tuples and Lists

Beginner++

  • List Comprehensions
  • Objects and Names
  • Dictionaries
  • Loops and Blocks
  • Iterables

Intermediate

  • Generator Expressions
  • Functions

Intermediate++

  • Generators
  • Namespaces
  • Simple Classes
  • Exceptions
ចំណាត់ក្រុម ៖ស្វែងយល់ពីផាយថុន

Development on GAE using Khmer Unicode

ខែសីហា 31, 2010 មតិ ១

Development on GAE using Khmer Unicode To handle Khmer Unicode text development, you need to configure a few settings to work properly. This tutorial continues the series from: Setup GAE Environment and complete a Hello World example with Khmer Unicode text. This tutorial shows how to setup a Khmer Unicode project using Eclipse with PyDev for Python Google AppEngine. It involves Unicode specific setup to handle Unicode text and how to display the Khmer Unicode correctly in your code and output to the web browser.

Requirements

  1. You already completed setup the environment from this tutorial Setup GAE Environment.
  2. Your development system is setup with Khmer Unicode and can type Khmer Unicode text.
  3. You have basic knowledge of Python. This is not a Python tutorial.

Setup File Encoding to 8-bit Unicode Format (UTF-8)

To display Khmer Unicode in Eclipse, first ensure that your project file encoding setting is UTF-8 so as you save the file, the Khmer Unicode text is saved properly.

  1. To do this, right click on the helloworld project and select Properties. Image
  2. In Resource tree, ensure UTF-8 is selected and you have Unix format for GAE env. For “Text file encoding”, select Others: UTF-8. Then for “New text file line delimiter” select Unix. This is good for GAE environment.
  3. Also ensure that the default file encoding preferences is UTF-8. To do that go to Window -> Preferences, then in the General -> Workspace and select the same options as the above step.

Configure Unicode Display

Now we are going to configure the font so Eclipse can display Khmer Unicode text properly. Note that if you skip this step, all Khmer Unicode text will not appear in the editor even though the character exists in the file. This is contrary to the web browser where it displays boxes for each character if the Khmer Unicode is not setup properly.

  1. Select General – Appearance – Colors and Fonts
  2. Click on Basic then “Text Font” and the three buttons to the right are enabled. Image
  3. Click on “Change…” then select a Khmer unicode font (ie.: Khmer OS System)
  4. Then click OK on Font dialgue,
  5. Do the same for the Debug, Console Font.
  6. Click OK on Preferences window.

Now test and make sure you can see Khmer text in the text editor:

  1. From the Package Explorer, double click on helloworld.py (under helloworld -> src)
  2. Now switch to Khmer Unicode Keyboard layout (simultaneously press left-Alt and right Shift key)
  3. Then enter the Khmer text in the file by changing the last line to something like this:
    print 'សួស្ដី ពិភពលោក!  Hello, world!'
    
  4. Now to ensure that the encoding is correct, save the file (press Ctrl-S). It should save correctly withou any prompt. If you get this error dialogue “Save could not be completed.” In this case go to setup the file encoding steps. As a side notes, if you were to run this code directly, you may get the following error.
    File "C:\workspace\helloworld\src\helloworld.py", line 3
    SyntaxError: Non-ASCII character '\xe1' in file C:\workspace\helloworld\src\helloworld.py on line 3,
    but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
    

    In this case, the Python does not know it is UTF-8 characters. See the next steps to complete the setup. If you were to run using GAE, you will not run into this error. But it recommended to go through the next steps.

Handling UTF-8 in Python

To tell Python compiler that you have UTF-8 text in your code, you can specified in the header the file encoding. To do that add the following line to the beginning of the file.

# -*- coding: utf-8 -*-

When you have UTF-8 strings in your code, specifies with a “u” in front of the strings to tell the compiler that it is Unicode text. For example:

# -*- coding: utf-8 -*-

s = 'ក'     # declare as regular string
utf = u'ក'  # declare as utf-8 string

print  "s type:", type(a), " utf type:", type(utf)
print  "s length:", len(a), " utf length:", len(utf)

This code outputs:

s type: <type 'str'>  utf type: <type 'unicode'>
s length: 3  utf length: 1

Notice that the same string is interpreted differently. The variable s without specified as Unicode is recognized as length 3 (3 bytes), where the variable utf is recognized as unicode type of length 1 as intended.

Output Khmer Unicode

Notice the above example does not print the Unicode text. If you were to print it out like this: “print utf”, you will get this error:

UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-5: character maps to <undefined>

This is because it does not know how to convert the Unicode string specified by the “u”. To tell the encoding you would need to do this:

print utf.encode("utf-8")

Note that in GAE, you can just output Khmer Unicode string as a normal string without specifying it to be Unicode. That way you can print it out normally without specify the encoding to UTF-8. But the only issue is that it would be difficult to parse that string properly. To complete a new Khmer Unicode Hello World version, we need to do a few more things.

  1. Tell the web browser that the character encoding for the output is UTF-8 by changing the HMTL header line to:
    print 'Content-Type: text/html; charset=UTF-8'
    
  2. Now tell the browser that this is Khmer Unicode text by format a HTML tag:
    print "<h1 style='font-family: \"Khmer OS\"'>"
    
  3. Now change the output string to Khmer Unicode and specified the encoding as:
    print u'សួស្ដី ពិភពលោក!  Hello, world!'.encode("UTF-8")
    

Here is a complete code:

# -*- coding: utf-8 -*-
print 'Content-Type: text/html; charset=UTF-8'
print ''
print "<h1 style='font-family: Khmer OS'>"
print u'សួស្ដី ពិភពលោក!  Hello, world!'.encode("UTF-8")
print "<<h1>"

Here is the output:

Image

Hello World output in Khmer

Tip

Without specified the font-family, most browsers like Firefox or Internet Explorer still can render Khmer Unicode text Ok. But some of the ligature might not work correctly. It is recommended that you specify the font-family to ensure that the text is rendering correctly. When setting letter spacing setting like “letter-spacing:-0.05em;”, it will result in Firefox 2 not rendering correctly but Microsoft Internet Explorer is rendering fine. Now you have completed a basic Khmer Unicode Hello World example. Enjoy coding and share your knowledge.

Author: phylypo@gmail.com (PosVekRoNeaM)

តាមដាន

Get every new post delivered to your Inbox.