ที่บ้านผมมีนิทานมือสองอยู่เยอะเลย
(ไปเหมามาจากสวนจตุจักร สมัยที่ราคาเล่มละ 10 บาท)
วันนี้เห็นนิทานเล่มนี้ใน net แล้วอดหัวเราะไม่ได้

ลองตามไปอ่านดู Link
ในหน้า 3 จะเห็นว่าเป็นหนังสือของ Microsoft, Windows Home Server
Javaเร็วส์, Javascript, Erlang, Python, Ruby, Clojure, Groovy, เลี้ยงลูก, วาดภาพ

Qi4j is a framework for domain centric application development, including evolved concepts from AOP, DI and DDD.
public class HelloWorld {
String name;
public String say() {
return "hello " + getName();
}
public void setName(String name) {
this.name = name;
}
public void getName() {
return name;
}
}
public interface HelloWorld
extends HelloWorldBehaviour, HelloWorldState
{
}
@Mixins( HelloWorldStateMixin.class )
public interface HelloWorldState
{
Property<String> name();
}
@Mixins( HelloWorldBehaviourMixin.class )
public interface HelloWorldBehaviour
{
String say();
}
public class HelloWorldBehaviourMixin
implements HelloWorldBehaviour
{
@ThisCompositeAs HelloWorldState state;
public String say()
{
return state.phrase() + " " + state.name();
}
}
public class HelloWorldStateMixin
implements HelloWorldState
{
@PropertyField Property<String> name;
public Property<String> name()
{
return name;
}
}
public interface HelloWorldComposite
extends HelloWorld, Composite
{
}
module HelloState
attr_accessor :name
end
module HelloBehavior
def say
puts "hello #{@name}"
end
end
class HelloWorld
include HelloState
include HelloBehavior
end
PXE-E53 No boot filename received

class MyClass {
private static MyClass instance;
private MyClass() {}
public static MyClass getInstance() {
if (instance == null) {
instance = new MyClass();
}
return instance;
}
}
public class Something
{
private Something() {}
private static class LazyHolder
{
private static final Something something = new Something();
}
public static Something getInstance()
{
return LazyHolder.something;
}
}
Subject: =?windows-874?B?UkU6ILe0ys26wNLJ0uS3wg==?=
Content-Type: text/plain;
charset="windows-874"
Content-Type: text/plain;
charset=CP874;
delsp=yes;
format=flowed
Subject: =?UTF-8?B?RndkOiDguYDguKHguKXguYzguInguJrguLHguJrguJfguLXguYg=?=
=?UTF-8?B?4Liq4Lit4LiH?=
$ defaults write com.apple.mail NSPreferredMailCharset "CP874"
class ApplicationController < AC::Base
def scope_story_by_account
Story.with_scope(:find =>
{:conditions => {:account_id => current_account.id},
:create => {:account_id => current_account.id}) {
yield }
end
around_filter :scope_by_account
end
class StoryController < ApplicationController
def create
@story = Story.new(params[:story])
# do some stuff to @story here...
@story.save #...@story.account_id won't be set
end
end
I think it's a poor choice to limit something that people find useful just because it doesn't fit your idea of useful. Why not let the coder make these
decisions?
You must be new here :). Rails is opinionated software. We make things that we consider good style easy to do and bad style hard. Or rather, we make good style beautiful and bad style ugly. So even though with_scope is going protected, you can still use it in filters if you really, really want to. Just use send(:with_scope) -- that'll side-step the access control. Yes, that'll be ugly and it's intended to be.
javascript_include_tag "prototype", "cart"
<script type="text/javascript" src="/javascripts/prototype.js"></script>
<script type="text/javascript" src="/javascripts/cart.js"></script>
javascript_include_tag "prototype", "cart", :cache => "shop"
<script type="text/javascript" src="/javascripts/shop.js"></script>
config.action_controller.perform_caching = true
+ swt
+ swt-linux-gtk-native
+ 3.3.0
- swt-linux-gtk-native-3.3.0.jar
+ swt-win32-native
+ 3.3.0
- swt-win32-native-3.3.0.jar
<profiles>
<profile>
<id>unix</id>
<activation>
<os>
<family>unix</family>
</os>
</activation>
<properties>
<swt.os-dep>swt-linux-gtk-native</swt.os-dep>
<swt.version>3.3.0</swt.version>
</properties>
</profile>
<profile>
<id>win32</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<properties>
<swt.os-dep>swt-win32-native</swt.os-dep>
<swt.version>3.3.0</swt.version>
</properties>
</profile>
</profiles>
<dependency>
<groupId>swt</groupId>
<artifactId>${swt.os-dep}</artifactId>
<version>${swt.version}</version>
</dependency>



# while doing something
git stash
# fix bug
git commit -a -m "xxxxx"
git stash apply
# กลับมาเมามันต่อ
git clone urlgit add yourfilename เพื่อ mark ว่าต้องการ commit file นี้ในอนาคตgit commit git add x เพื่อบอก git ว่าต้องการที่จะ commit file นี้git commitgit add x เพื่อบอก git ว่าต้องการที่จะ commit file นี้git add x อีกรอบgit commitgit add เป็นการสั่ง add content ที่เปลี่ยนแปลง ณ ขณะนั้นgit add -igit add -i
pphetra@pann:~/temp/s$ git add -i
staged unstaged path
1: unchanged +2/-0 x
*** Commands ***
1: status 2: update 3: revert 4: add untracked
5: patch 6: diff 7: quit 8: help
*** Commands ***
1: status 2: update 3: revert 4: add untracked
5: patch 6: diff 7: quit 8: help
What now> 8
status - show paths with changes
update - add working tree state to the staged set of changes
revert - revert staged set of changes back to the HEAD version
patch - pick hunks and update selectively
diff - view diff between HEAD and index
add untracked - add contents of untracked files to the staged set of changes
*** Commands ***
1: status 2: update 3: revert 4: add untracked
5: patch 6: diff 7: quit 8: help
What now> 5
staged unstaged path
1: unchanged +2/-0 x
Patch update> 1
diff --git a/x b/x
index abe1496..61916db 100644
--- a/x
+++ b/x
@@ -1,3 +1,5 @@
+hi bunny
hello
hi pok
hi pann
+hi pune
Stage this hunk [y/n/a/d/s/?]? ?
y - stage this hunk
n - do not stage this hunk
a - stage this and all the remaining hunks
d - do not stage this hunk nor any of the remaining hunks
j - leave this hunk undecided, see next undecided hunk
J - leave this hunk undecided, see next hunk
k - leave this hunk undecided, see previous undecided hunk
K - leave this hunk undecided, see previous hunk
s - split the current hunk into smaller hunks
จะเห็นได้ว่า การจัดการ patch ของ git เร้าใจกว่า svn เยอะ
@@ -1,3 +1,5 @@
+hi bunny
hello
hi pok
hi pann
+hi pune
Stage this hunk [y/n/a/d/s/?]? s
Split into 2 hunks.
@@ -1,3 +1,4 @@
+hi bunny
hello
hi pok
hi pann
Stage this hunk [y/n/a/d/j/J/?]? y
@@ -1,3 +2,4 @@
hello
hi pok
hi pann
+hi pune
Stage this hunk [y/n/a/d/K/?]? d
*** Commands ***
1: status 2: update 3: revert 4: add untracked
5: patch 6: diff 7: quit 8: help
What now> 7
Bye.

DateTextBox -> TimeTextBox -> RangeBoundTextBox ->
MappedTextBox -> ValidationTextBox -> TextBox
dojo.declare("ThaiDateTextBox", [dijit.form.DateTextBox], {
// กำหนดตัว calendar ตัวใหม่ที่แสดงผลภาษาไทย
_popupClass: "ThaiCalendar",
// value ที่รับเข้ามา มี type เป็น date object
// เมื่อได้มาแล้วก็โยนไปให้ dojo.date.locale.format จัดการ format ให้ก่อน
// แล้วค่อยนำมาตัด ปี เพื่อ + 543 หรือ 43 เข้าไปอีกที (ขึ้นอยู่กับ format)
// note: มี bug กรณี format yy ที่จะมี overflow
format: function(value, constraints) {
if(!value || value.toString() == this._invalid){ return null; }
var sidx = constraints.datePattern.indexOf('yy');
var fvalue = dojo.date.locale.format(value, constraints);
var ycnt = 2;
var adj = 43;
if (/yyyy/.exec(constraints.datePattern)) {
ycnt = 4;
adj = 543;
}
return fvalue.substr(0,sidx) + (parseInt(fvalue.substr(sidx, ycnt)) + adj);
},
// value ที่รับเข้ามา จะอยู่ในรูป datePattern ที่เรากำหนดตอน declare widget
// เมื่อได้มา ก็ทำการ - 543 เพื่อแปลงเป็น ค.ศ. ก่อนส่งให้ dojo.date.locale.parse
parse: function(value, constraints) {
var sidx = constraints.datePattern.indexOf('yy');
if (/yyyy/.exec(constraints.datePattern)) {
nyear = parseInt(value.substr(sidx, 4)) - 543;
} else {
nyear = String(parseInt(value.substr(sidx, 2)) + 2500 - 543).substr(2,2);
}
var newValue = value.substr(0, sidx) + nyear;
return dojo.date.locale.parse(newValue, constraints);
}
});
<!-- Arbitrary defaults. locales and currencies properties can be altered or eliminated to build the entire set -->
<property name="locales" value="en-us,th-th"/>
dojo.declare("ThaiCalendar", [dijit._Calendar], {
_setText: function(node, text) {
if (/YearLabelNode/.exec(node.getAttribute("dojoattachpoint"))) {
arguments[1] = parseInt(text) + 543;
}
return this.inherited('_setText', arguments);
}
});
<script type="text/javascript" src="./js/dojo/dojo.js"
djConfig="isDebug: true, parseOnLoad: true, locale: 'th'"></script>
...
<span id="d1" dojoType="ThaiDateTextBox"
constraints="{datePattern:'dd/MM/yy'}"/>
ความผิดพลาดนั้นเป็นของควบคู่กับงาน แต่ความผิดพลาดของหมอกับของครูนั้น มีความรุนแรงเหมือนกันอยู่อย่างนึง ของหมอนั้น ความผิดพลาดมักจะไปลงเอยหลายที่ หน้าหนังสือพิมพ์ website ปาฐกถา บรรยาย small group, etc และเป็นเรื่องของความเป็น ความตาย หรือ พิการ ส่วนความผิดพลาดของครูนั้น อาจจะหมายถึงชาติกำเนิดและการพัฒนาจิตที่บิดเบี้ยว เสียรูปร่างอย่างแรง และกรอบการเติบโตอันคับแคบ อับจนปัญญา ไร้ความคิดคะนึงหา ติดกับดักวิญญาณ การใช้ชีวิตที่ไม่เต็มสมศักยภาพของตนเอง

git-daemon --reuseaddr --export-all --base-path=. --enable=receive-pack .
%% echo server แบบง่ายๆ
start() ->
{ok, Listen} = gen_tcp:listen(4114, [list,
{reuseaddr, true},
{active, true}]),
{ok, Socket} = gen_tcp:accept(Listen),
gen_tcp:close(Listen),
loop(Socket).
loop(Socket) ->
receive
{tcp, Socket, Data} ->
%% ก่อน parse ก็ให้ตัด byte สุดท้ายที่เป็น zero byte ออกก่อน
Txt = xmlutil:parse(strip(Data, right, $\0)),
%% ตอนส่งกลับก็ให้ต่อท้ายด้วย zero byte กลับไปด้วย
gen_tcp:send(Socket, concat(xmlutil:encode(concat(Txt, " pok")), [0])),
loop(Socket);
{tcp_closed, Socket} ->
io:format("Socket closed~n")
end.
eval(S,Environ) ->
{ok,Scanned,_} = erl_scan:string(S),
{ok,Parsed} = erl_parse:parse_exprs(Scanned),
erl_eval:exprs(Parsed,Environ).
2> simple_server:eval("X=1+2.",[]).
{value,3,[{'X',3}]}
3> simple_server:eval("{plus,1,2}.",[]).
{value,{plus,1,2},[]}
loop(Socket) ->
receive
{tcp, Socket, Data} ->
Str = strip(Data,right,$\0),
{value, Cmd, _} = eval(Str,[]),
Result = execute(Cmd),
gen_tcp:send(Socket, concat(Result, [0])),
loop(Socket);
{tcp_closed, Socket} ->
io:format("Socket closed~n")
end.
execute({hello}) -> "world";
execute({who}) -> "pok";
execute({plus, X, Y}) -> integer_to_list(X+Y).
eval(S) ->
{ok,Scanned,_} = erl_scan:string(S),
{ok,Term} = erl_parse:parse_term(Scanned),
Term.

@pann[~/projects/javascript/test]$ darcs push ../dojo-grid/
Fri Oct 26 11:07:32 ICT 2007 pphetraATgmail.com
* remove unused css
Shall I record this patch? (1/?) [ynWsfqadjkc], or ? for help: ?
How to use record...
y: record this patch
n: don't record it
w: wait and decide later, defaulting to no
s: don't record the rest of the changes to this file
f: record the rest of the changes to this file
d: record selected patches, skipping all the remaining patches
a: record all the remaining patches
q: cancel record
j: skip to next patch
k: back up to previous patch
c: calculate number of patches
Shall I push this patch? (1/1) [ynWvpxqadjk], or ? for help: y
Finished applying...
wsdl2ruby.rb --wsdl https://rdws.rd.go.th/ServiceRD/CheckTINPINService.asmx?wsdl --type client
at depth 0 - 20: unable to get local issuer certificate
F, [2007-10-19T14:41:50.023698 #12255] FATAL -- app:
Detected an exception. Stopping ... certificate verify failed (OpenSSL::SSL::SSLError)
/usr/lib/ruby/gems/1.8/gems/httpclient-2.1.2/lib/httpclient.rb:1039:in `connect'
/usr/lib/ruby/gems/1.8/gems/httpclient-2.1.2/lib/httpclient.rb:1039:in `ssl_connect'
wsdl2ruby.rb --wsdl rdservice.wsdl --type client
# เริ่มด้วยการ require soap4r
require 'rubygems'
gem 'soap4r'
# include generated library
require 'defaultDriver'
# initialize service
service = CheckTINPINServiceSoap.new()
# parameter
parameters = ServicePIN.new('anonymous', 'anonymous', '3100905022221')
# invoke service
resp = service.servicePIN(parameters)
puts resp
at depth 0 - 20: unable to get local issuer certificate
/usr/lib/ruby/gems/1.8/gems/httpclient-2.1.2/lib/httpclient.rb:1039:in `connect': certificate verify failed (OpenSSL::SSL::SSLError)
from /usr/lib/ruby/gems/1.8/gems/httpclient-2.1.2/lib/httpclient.rb:1039:in `ssl_connect'
from /usr/lib/ruby/gems/1.8/gems/httpclient-2.1.2/lib/httpclient.rb:1466:in `connect'
service.options['protocol.http.ssl_config.verify_mode'] =
OpenSSL::SSL::VERIFY_NONE
pp resp # =>
#<ServicePINResponse:0xb77b11e8
@servicePINResult=
#<ServicePINResponse::ServicePINResult:0xb77b10f8
@diffgram=
#<SOAP::Mapping::Object:0x..fdbbd53ca {}NewDataSet=#<SOAP::Mapping::Object:0x..fdbbd50b4
{}Message=#<SOAP::Mapping::Object:0x..fdbbd503c {}Code="E00008" {}Description="\340\271\200\340\270\245\340\270\202
PIN \340\271\204\340\270\241\340\271\210\340\270\226\340\270\271\340\270\201\340\270\225\340\271\211\340\270\255\340
\270\207 \340\271\200\340\270\231\340\270\267\340\271\210\340\270\255\340\270\207\340\270\210\340\270\262\340\270\201
\340\270\253\340\270\241\340\270\262\340\270\242\340\271\200\340\270\245\340\270\202PIN\340\271\200\340\270\233\340
\271\207\340\270\231\340\270\225\340\270\261\340\270\247\340\270\255\340\270\261\340\270\201\340\270\251\340\270\243
\340\270\253\340\270\243\340\270\267\340\270\255\340\271\200\340\270\245\340\270\202PIN\340\271\200\340\270\233\340
\271\207\340\270\231\340\270\225\340\270\261\340\270\247\340\270\255\340\270\261\340\270\201\340\270\251\340\270\243
\340\270\253\340\270\243\340\270\267\340\270\255\340\270\210\340\270\263\340\270\231\340\270\247\340\270\231\340\270
\253\340\270\245\340\270\261\340\270\201\340\271\200\340\270\227\340\271\210\340\270\262\340\270\201\340\270\261\340
\270\23213\340\270\253\340\270\245\340\270\261\340\270\201\340\270\253\340\270\243\340\270\267\340\270\255\340\270\243
\340\270\271\340\270\233\340\271\201\340\270\232\340\270\232 PIN\340\271\204\340\270\241\340\271\210\340\270\226\340
\270\271\340\270\201\340\270\225\340\271\211\340\270\255\340\270\207 <br> PIN incorrect <br> => \"3100905017911x\"">>>,
@schema=
#<SOAP::Mapping::Object:0x..fdbbd87f0 {http://www.w3.org/2001/XMLSchema}element=#<SOAP::Mapping::Object:0x..fdbbd8782
{http://www.w3.org/2001/XMLSchema}complexType=#<SOAP::Mapping::Object:0x..fdbbd870a {http://www.w3.org/2001/XMLSchema}
choice=#<SOAP::Mapping::Object:0x..fdbbd8692 {http://www.w3.org/2001/XMLSchema}element=#<SOAP::Mapping::Object:0x..fdbbd861a
{http://www.w3.org/2001/XMLSchema}complexType=#<SOAP::Mapping::Object:0x..fdbbd85a2 {http://www.w3.org/2001/XMLSchema}
sequence=#<SOAP::Mapping::Object:0x..fdbbd852a {http://www.w3.org/2001/XMLSchema}element=["", ""]>>>>>>>>>
service.wiredump_dev = STDERR if $DEBUG
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body><ServicePINResponse xmlns="https://rdws.rd.go.th/ServiceRD/CheckTINPINService">
<ServicePINResult><xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"><xs:element name="NewDataSet"
msdata:IsDataSet="true"><xs:complexType><xs:choice maxOccurs="unbounded">
<xs:element name="Message"><xs:complexType><xs:sequence><xs:element name="Code"
type="xs:string" minOccurs="0" /><xs:element name="Description" type="xs:string" minOccurs="0" />
</xs:sequence></xs:complexType></xs:element></xs:choice></xs:complexType></xs:element></xs:schema>
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<NewDataSet xmlns=""><Message diffgr:id="Message1" msdata:rowOrder="0" diffgr:hasChanges="inserted">
<Code>E00008</Code><Description>เลข PIN ไม่ถูกต้อง เนื่องจาก
หมายเลขPINเป็นตัวอักษรหรือเลขPINเป็นตัวอักษรหรือจำนวนหลักเท่ากับ13หลักหรือรูปแบบ PINไม่ถูกต้อง
<br> PIN incorrect <br> => "3100905017911x"</Description></Message></NewDataSet>
</diffgr:diffgram></ServicePINResult></ServicePINResponse></soap:Body></soap:Envelope>
+ ServicePINResponse
+ ServicePINResult
+ diffgram
+ NewDataSet
+ Message
+ Code
+ Description
puts resp.servicePINResult.diffgram.newDataSet.Message.Description
puts resp.servicePINResult.diffgram.newDataSet['Message']['Code']
puts resp.servicePINResult.diffgram.newDataSet['Message']['Description']
window.onLoad=function() {
window.setInterval(myrefresh, 30000);
}
function myrefresh() {
... do something
}
dojo.xhrGetdojox.timing.Timer ให้ใช้dojo.require("dojox.timing._base");
dojo.addOnLoad(function() {
var timer = new dojox.timing.Timer(30 * 1000);
timer.onTick=function() {
... do something
}
timer.start();
});
dojox.timing.Sequence ก็ได้var seq = [
{func: [showMessage, window,
"i am first"], pauseAfter: 1000},
{func: [showMessage, window,
"after 1000ms pause this should be seen"], pauseAfter: 2000},
{func: [showMessage, window,
"another 2000ms pause and 1000ms pause before"], pauseAfter: 1000},
{func: [showMessage, window,
"repeat 10 times and pause 100ms after"], repeat: 10, pauseAfter: 100},
{func: returnWhenDone} // no array, just a function to call
];
dojo.provide("orangegears.dom.Util");
orangegears.dom.Util = {
up: function(node, expression) {
var ancestors = this.ancestors(node);
for (var i = 0; i < ancestors.length; i++) {
var tmp = dojo.query(expression, ancestors[i]);
if (tmp.length > 0) {
return tmp[0];
}
}
return [];
},
ancestors: function(node) {
return this.recursivelyCollect(node, "parentNode");
},
recursivelyCollect: function(element, property) {
var elements = [];
while (element = element[property])
if (element.nodeType == 1)
elements.push(element);
return elements;
}
}
<ul>
<li>xxx</li>
<li>yyy</li>
<li class="item">
zzz
<!-- กดแล้วจะ remove item ที่เป็นพ่อของปุ่มนี้ออก -->
<input type='button' value="remove"
onclick='this.up(".item").remove()'/>
</li>
</ul>
dojo.provide("orangegears.dom.Util");
orangegears.dom.Util.up = function(node, expression) {
var ancestors = orangegears.dom.Util.ancestors(node);
for (var i = 0; i < ancestors.length; i++) {
var tmp = dojo.query(expression, ancestors[i]);
if (tmp.length > 0) {
return tmp[0];
}
}
return [];
}
orangegears.dom.Util.ancestors = function(node) {
return orangegears.dom.Util.recursivelyCollect(node, "parentNode");
}
orangegears.dom.Util.recursivelyCollect = function(element, property) {
var elements = [];
while (element = element[property])
if (element.nodeType == 1)
elements.push(element);
return elements;
}
dijit.byId(orangegears.dom.Util.up(this, '.dojoxGrid').id).setAll(this.checked);

They see only their own shadows, or the shadows of one another, which the fire throws on the opposite wall of the cave?
Socrates
The Allegory of the Cave (The Republic , Book VII)
ผู้ใช้แรงงาน(รวมมนุษย์เงินเดือนบางพวก) เป็นผู้มีฐานะทางสังคมระดับล่าง มีจำนวนมาก รวมกันไม่ติด อ่อนแอ ไม่มีอำนาจต่อรอง
ระบบประกันสังคม เป็นระบบลงขันตามสัดส่วนรายได้ แล้วจ่ายคืนในรูปสวัสติการพื้นฐาน เช่น รักษาพยาบาล
หลอกให้เชื่อว่า ให้หลักประกันชราภาพ (แต่สะสมเงินสมทบแบบจำกัด จึงจ่ายคืนแบบจำกัด) ทั้ง ๆ ที่ไม่สามารถดำรงชีวิตอยู่ได้จากเงินรับกรณีชราภาพ แล้วถ้าคำนวณเป็น จะรู้ว่า เงินกองทุนชราภาพจะไม่พอจ่าย เพราะ (สมทบเดือนละ 1.5% + อีกเท่าตัวจากนายจ้าง แล้วได้รับบำนาญต่อเดือน 15% ของเฉลี่ย 60 เดือนสุดท้าย สูงสุด 2,250 บาท) ส่งสมทบ 1 ปี จ่ายคืนได้แค่ 2 เดือนกว่าก็หมด ทำงานมา 30 ปี จ่ายคืนได้ 72 เดือน(6 ปี) ส่วนที่สมทบไว้หมดแล้ว ดอกผลไม่มากพอ แต่คนอายุยืนกว่า 61 ปี (สิทธิชราภาพ เริ่มได้เมื่อไม่ทำงานหลังอายุครบ 55 ปี)
เรื่องประกันสังคม ต่อไปจะเป็นปัญหาสังคม เมื่อกองทุนไม่มั่นคง แต่ตอนนี้ปัญหายังซุกตัวอยู่ใน ภูเขาน้ำแข็ง คนส่วนใหญ่เห็นเม็ดเงินสะสมมูลค่ามาก เพราะ สิทธิประโยชน์ชราภาพยังไม่เกิดเต็มที่ คนที่เกษียณตอนนี้ กรณีสมทบไม่เกิน 12 เดือน จะได้รับบำเน็จเอาเงินก้อนที่สมทบไว้ คืนกลับไปบวกดอกเบี้ยนิดหน่อย (ถ้าสมทบเกิน 12 เดือน แต่ไม่ถึง 180 เดือน ได้คืนส่วนของนายจ้างด้วย) ปลายปี 2556 จึงจะเริ่มได้สิทธิบำนาญ เมื่อถึงเวลานั้น เงินกองทุนชราภาพ จะเริ่มหดหาย ซึ่งอาจจะยังไม่รู้สึก เพราะ เงินเข้ายังมากกว่าเงินออก ต้องผ่านไป 10 ปี 20 ปี เมื่อคนเกษียณมากขึ้น แล้วไม่ตายง่าย จนหมุนเงินเข้าไม่ทันเงินออก จึงจะเริ่มเห็นอาการเงินกองทุนหด แต่เพราะเวลายังอีกนาน จะยังไม่มีใครร้อนตัวตอนนี้ พวกลูกจ้างจะเรียกร้องสิทธิประโยชน์เพิ่ม โรงพยาบาลจะเก็บเงินเพิ่ม พวกเหลือบจะมาดูดเงินจากกองทุน
ผมอายุยืนไม่ถึง ที่จะเห็นปัญหาปูดขึ้นมา
การประกันสังคม เป็นลักษณะการออมแบบหนึ่ง (กองทุนสำรองเลี้ยงชีพ ก็เช่นเดียวกัน) แต่การออมแบบนี้ บรรเทาความวิกฤตทางสังคมได้หน่อยหนึ่ง ไม่พอเลี้ยงชีพเมื่อยามแก่เฒ่า
ถ้าผู้ใช้แรงงานเป็นคนแก่ ไม่มีลูกหลานเลี้ยงดู ก็อยู่ไม่ได้ ถ้าลูกหลาน ยังไม่เปลี่ยนฐานะจากผู้ใช้แรงงาน เป็นฐานะอื่นที่ดีกว่า ก็อาจดูแลได้จำกัด เพราะ ลำพังตัวผู้ใช้แรงงาน ดูแลตัวเอง ก็ลำบาก
ยุคอุตสาหกรรม ผู้ใช้แรงงานในโรงงาน เป็นผู้หนุนความมั่งคั่งให้นายทุน
Knowledge worker คือ ผู้มีการศึกษา ต่างจากผู้ใช้แรงงานในโรงงาน พวกนี้มีพัฒนาการสูงกว่า (แต่สำหรับประเทศไทย เราขยับตัวด้านการศึกษาช้าเกินไป เหมือนกับเป็นคนหลับ ถึงตอนนี้ ก็ยังไม่ตื่น สะลึมสะลือ งัวเงีย เราหลงผิดว่าเราทำดีที่สุดแล้ว เพราะ ประเทศเราอุดมสมบูรณ์ เราจึงไม่ค่อยกระตือรือร้น )
ในส่วนที่เกี่ยวกับประกันสังคม บริษัทของเราจ่ายเงินสมทบ มากกว่ารับประโยชน์คืน พนักงานส่วนใหญ่เป็น Knowledge worker แต่พวกเราบางคนอาจจะยังไม่ตระหนักว่า เราจะต้องรู้จักออมมากกว่าที่เป็นอยู่ สังคมรอบข้าง มีวัตถุหลอกล่อให้เราหลงไหลง่าย เราต้องรู้จักอดกลั้นต่อสิ่งยั่วกิเลส ยั่วความฟุ้งเฟ้อ เราต้องนึกถึงวันข้างหน้าที่อาจไม่แน่นอน ต้องเผื่อเหนียว กลัวอด เราจะไปหวังพึ่งเงินบำนาญชราภาพจากประกันสังคมไม่ได้ อนาคตอยู่ในมือเราเอง แต่เราร่วมมือกันหนักแน่น จะแข็งแรงกว่าคนเดียวหรือจับมือแบบหลวม ๆ
ดร. สุริยัน ติษยาฐิคม
var treeData = {
label: "name",
identifier: "id",
items: [
{ id: 1, name: "Micro-X", children: [
{ id: 3, name: "Developement" },
{ id: 4, name: "R&D" }
] },
{ id: 2, name: "Ingres", children: [
{ id: 5, name: "Marketing" }
] }
]
}
var store = new dojo.data.ItemFileReadStore({ data: treeData });<div dojoType="dijit.Tree" store="store" id="tree" label="Company">
</div>

<div dojoType="dijit.Tree" store="store" id="tree" label="Company">
<script type="dojo/connect" event="onClick" args="item">
console.debug(item.name);
var name = store.getValue(item, "name");
console.debug(name);
</script>
</div>
item.name เพื่อดึงค่าขึ้นมา, ค่าที่ได้จะได้ datatype เป็น array แทนที่จะเป็น string ธรรมดา (ตามที่เรา declare ไว้)store.getValue(item, "name")<div dojoType="dijit.Tree" store="store2" id="tree2" label="Company">
<script type="dojo/method" event="getLabel" args="item">
return store2.getValue(item, "name") + "_hi";
</script>
</div>
<div dojoType="dijit.Tree" store="store4" id="tree4" label="Company" childrenAttr="children,staffs">
<script type="dojo/method" event="getLabelClass" args="item">
if (item) {
if (this.store.getValue(item, "type") == 'employee') {
return "employee";
}
}
return "";
</script>
</div>
var treeData2 = {
label: "name",
identifier: "id",
items: [
{ id: 1, name: "Micro-X", children: [
{ id: 3, name: "Developement" },
{ id: 4, name: "R&D" }
] },
{ id: 2, name: "Ingres", children: [
{ _reference: { id: 3 }},
{ id: 5, name: "Marketing" }
] }
]
} var treeData4 = {
label: "name",
identifier: "id",
items: [
{ type: "company", id: 1, name: "Micro-X", children: [
{ type: "department",
id: 3, name: "Developement",
staffs: [
{type: "employee", id: 100, name: "pok"}
]
},
{ type: "department",
id: 4, name: "R&D",
staffs: [
{type: "employee", id: 101, name: "kob"}
]
}
] },
{ type: "company", id: 2, name: "Ingres", children: [
{ _reference: { id: 3 }},
{ type: "department", id: 5, name: "Marketing" }
] }
]
}
<div dojoType="dijit.Tree" store="store3" id="tree3" label="Company" childrenAttr="children,staffs">
</div>