วันศุกร์ที่ 30 มิถุนายน พ.ศ. 2560

HTTP2.0

https://medium.com/@DarkDrag0nite/http-2-คืออะไร-331b3e7b5866

วันพฤหัสบดีที่ 29 มิถุนายน พ.ศ. 2560

ระดับการวัด impact ของงานวิจัย


  1. วัดจากคุณภาพของการตีพิมพ์ เช่น IF
  2. วัดจากการถูกนำไปอ้างอิง (citation count)
  3. วัดจากการนำไปใช้ประโยชน์ (ขึ้นห้าง)
  4. วัดจากประโยชน์ที่เกิดขึ้นจากการนำไปใช้ประโยชน์ ซึ่งอาจเป็นตัวเงินหรือประโยชน์เชิงสังคม

Websvr VS. CoLo VS. Dedicatedsvr VS. VPS

https://www.thanop.com/vps/

VPS (virtual private server) = virtual dedicated server

วันศุกร์ที่ 16 มิถุนายน พ.ศ. 2560

bitcoin & blockchain

Bitcoin is a digital asset and a payment system. The system is peer-to-peer and transactions take place between users directly, without an intermediary i.e. banks. These transactions are recorded in a distributed ledger (สมุดบัญชี) called blockchain. Bitcoin miners verify bitcoin transactions to get awarded as bitcoins. (https://youtu.be/C_sYagsr014)

Blockchain is a secure distributed immutable database shared by all parties in a distributed network.
https://medium.com/@Francesco_AI/the-convergence-of-ai-and-blockchain-whats-the-deal-60c618e3accc

To summarize, a blockchain is a decentralized database which logs records by grouping transactions (data) into blocks. These records are unchangeable, append-only and can be used to create and document a history of lots of different things.
https://medium.com/blockchain-review/whats-the-difference-between-blockchain-distributed-ledger-technology-19407f2c2216

A blockchain is a distributed public ledger that is secured by a peer-to-peer network and registers transactions and maintains assets without the need for centralized authority. The records on the blockchain are grouped in a logical block structure. These blocks are linked sequentially one after the other, and the entire chain is referred to as a blockchain. Blocks placed anywhere on the blockchain cannot be changed without changing other blocks.

In the step 3 of the below picture, account owner uses his/her own private key to encrypt transaction (e.g. money transfer). In the step 4, bitcoin miners uses public key of that guy to approve the transaction. In the step 5, the miners hash the transaction and store in blockchain. For more details, please see the second picture.










Cf. https://www.weforum.org/agenda/2017/06/blockchain-is-stalling-but-whats-holding-it-up?utm_content=buffer867c2&utm_medium=social&utm_source=facebook.com&utm_campaign=buffer












3 miner ต้องใช้ PK ถอดคำสั่งโอนเงินเพื่อตรวจสอบว่ามาจากเจ้าของ pk ตัวจริง จึง เอา transaction ดังกล่าวของ Alice ใส่ block แล้วเริ่มขุดบิทซึ่งเป็นการแข่งกันหา nounce เพื่อสร้างค่า hash (ของ previous hash+transaction+nounce) ที่ตรงตาม prefix format ของ bitcoin ก่อนก็จะได้รับรางวัลเป็น bitcoin จากนั้นก็จะส่ง nounce ที่ hash ได้ก่อนนั้นไปให้คนอื่นๆ ลอง hash ว่าถูกต้องไหมก่อนเอาใส่ blockchain ของแต่ละคน กระบวนการตั้งแต่เริ่มขุดจนทุกคนยอมรับนี้เรียกว่า consensus protocol หรือ proof of work (PoW) ซึ่งช่วยป้องกันไม่ให้การแอบแก้ไขทำได้โดยรวดเร็วทุกโหนด เพราะการขุดเพื่อ append แต่ละ block ใช้เวลาประมาณ 10 นาที จึงไม่รองรับการ read จาก chain แบบ real-time ข้อมูล transactions ทั้งหมดจะถูก replicated ไว้ทุกโหนด

https://nuuneoi.com/blog/blog.php?read_id=933

http://staging.spectrum.ieee.org/static/how-a-bitcoin-transaction-works

Bitcoin values in many aspects
https://www.quora.com/How-is-the-value-of-Bitcoin-calculated

Original price of bitcoin is just like that of orange
https://www.luno.com/learn/en/article/how-is-the-price-of-bitcoin-calculated

More about bitcoin
https://bitcoin.org/
http://www.imponderablethings.com/

แท่นทำเหมือนเงินคริปโต (cryptocurrency mining rig) คือ computer ปกติแต่มี GPU หลายตัวหน่อย เช่น

  • MINING Motherboard intel
  • Integrated Intel CPU
  • 4Gb of RAM DDR3
  • 8 GPU NVIDIA P-104
  • SERVER MiningCave BOX
  • YOU NEED TO CHOOSE POWERSUPPLY IN OPTION
  • YOU NEED TO CHOOSE YOUR OS IN OPTION

(https://miningcave.com/product/8-gpu-box-8x-p-104/)


Blockchain platforms:
https://www.ibm.com/cloud/blockchain-platform/developer

https://www.ethereum.org/

https://libra.org/en-US/open-source-developers/

Blockchain is good for logging digital assets with high incentive to rob.

Ethereum development VM (เป็น service แล้ว connect ด้วย Chrome extension) : https://www.trufflesuite.com/

Remix เป็น IDE สำหรับภาษา solidity ที่ใช้กับ Ethereum

===PoW vs Proof of Stake (PoS)===
Two popular consensus mechanisms in blockchain technology.

1. Proof of Work (PoW):
Mechanism: PoW is a consensus algorithm used by blockchains like Bitcoin. In PoW, miners compete to solve complex mathematical problems to validate and add a new block to the blockchain. Solving the problem requires computational power and energy, making it a costly process.
Advantages: PoW is highly secure due to the difficulty and cost involved in solving the problems, making it hard for any single entity to take control.
Drawbacks: PoW is criticized for its energy consumption, as miners use significant computational resources, which has environmental implications.

2. Proof of Stake (PoS):
Mechanism: PoS relies on validators who are selected based on the number of coins they hold and are willing to "stake" as collateral. These validators are then allowed to create new blocks and validate transactions based on their stake. The larger the stake, the higher the chance of being selected as a validator.
Advantages: PoS is much more energy-efficient than PoW, as it doesn’t require extensive computation. Additionally, it encourages long-term investment in the blockchain, as validators benefit by holding and staking coins.
Drawbacks: PoS can be seen as less decentralized since wealthier participants (those with more coins staked) have more influence in block validation, potentially leading to centralization.
In essence, PoW relies on computational effort, while PoS relies on the financial stake validators have in the system. The choice of PoW or PoS affects the blockchain's energy consumption, security model, and degree of decentralization.


วันพฤหัสบดีที่ 15 มิถุนายน พ.ศ. 2560

Conference committee structure and roles/responsibilities

https://www.ieee.org/conferences_events/conferences/organizers/roles_responsibilities.html

วันพฤหัสบดีที่ 25 พฤษภาคม พ.ศ. 2560

Structures of data


  • Structured content ใช้ predefined data model e.g. RDBs
  • Semi-structured structure content มี tag บอกความหมายภายใน เช่น XML tags แต่ไม่มี predefined data model รองรับ e.g. Word document, source code
  • Unstructured content ไม่มี predefined data model e.g. video, image

วันพฤหัสบดีที่ 18 พฤษภาคม พ.ศ. 2560

Machine learning frameworks


Google's Deepmind research group uses Tensorflow framework
Tensorflow is a python/C open-source machine learning framework

https://venturebeat.com/2016/04/29/deepmind-ai-group-moves-from-torch-framework-to-googles-own-tensorflow/

ML tutorial by Google
https://developers.google.com/machine-learning/crash-course/

AWS and Azure support MXNet
https://mxnet.apache.org/
Many other machine learning frameworks available:
https://en.wikipedia.org/wiki/Comparison_of_deep_learning_software

Spark MLlib is Apache Spark's scalable machine learning library i.e. machine learning for big data.
Spark is comparable and better than Hadoop Map Reduce.
Deep learning for Java
Just a portal

Apache Hadoop adopted a technique called mapreduce, which maps data queries across parallel processing resources and then reduces to useful results.

Keras (the Python Deep Learning library) is a high-level neural networks API, written in Python and capable of running on top of TensorFlowCNTK, or Theano. It was developed with a focus on enabling fast experimentation.

ImageAI is a State-of-the-art Recognition and Detection AI with few lines of code. http://imageai.org/

Frameworks for 

วันอังคารที่ 16 พฤษภาคม พ.ศ. 2560

ตัวอย่าง restful web service

บริการข้อมูลและสารสนเทศอุตุนิยมวิทยาและแผ่นดินไหว (TMDAPI)

http://data.tmd.go.th/api/index1.php

เป็น REST ที่ใช้ GET method ในการทำงาน เช่น GET...

แสดงข้อมูลข่าวประกาศเตือนภัยล่าสุด
http://data.tmd.go.th/api/WeatherWarningNews/v1/?uid=demo&ukey=demokey

แสดงข้อมูลข่าวประกาศล่าสดแบบ json
http://data.tmd.go.th/api/WeatherWarningNews/v1/?uid=demo&ukey=demokey&format=json

แสดงข้อมูลข่าวประกาศที่ออกประกาศในปี 2015 แบบ xml
http://data.tmd.go.th/api/WeatherWarningNews/v1/?uid=demo&ukey=demokey&format=xml&year=2015

วันจันทร์ที่ 8 พฤษภาคม พ.ศ. 2560

Convolution neural network (cnn)

An MLP with normally 3 hidden layers : convolution layer (similar to sliding window but here called filter producing output called feature map) & pooling layer (for non-linear down-sampling e.g. max pooling taking max value pixel) & fully connected layer.
Traditional MLP do not scale well to higher resolution images. For example, in CIFAR-10, images are only of size 32x32x3 (32 wide, 32 high, 3 color channels), so a single fully connected neuron in a first hidden layer of a regular neural network would have 32*32*3 = 3,072 weights. A 200x200 image, however, would lead to neurons that have 200*200*3 = 120,000 weights.
Also, such network architecture does not take into account the spatial structure of data, treating input pixels which are far apart the same as pixels that are close together. Thus, full connectivity of neurons is wasteful for the purpose of image recognition




CNN classification (by Gemini)
1. Image-Based CNNs
Classic Architectures: LeNet-5, AlexNet, VGGNet, GoogLeNet, ResNet
Specialized Architectures: MobileNet, EfficientNet, DenseNet, R-CNN, Fast R-CNN, Faster R-CNN, Mask R-CNN
Key Features: Grid-like input data, convolutional layers, pooling layers, fully connected layers.
2. Sequence-Based CNNs
1D CNNs: Used for processing sequential data like text or time series.
Key Features: 1D convolutional layers, pooling layers, fully connected layers.
3. Graph-Based CNNs
GCNs: Graph Convolutional Networks; while Image-based CNNs are designed to process data with a regular grid structure, like images, GCNs can handle data where data can be naturally represented as a graph, such as social networks, molecular structures, and knowledge graphs.
Key Features: Graph-structured input data, graph convolution operation, graph Laplacian, handling irregular data.
4. Hybrid CNNs
Combining Different Types: CNNs can be combined with other architectures like Recurrent Neural Networks (RNNs) or Long Short-Term Memory (LSTM) networks for tasks involving both spatial and temporal information.

zigbee

คาร์ล ริทเท่อร์ ฟอน ฟริช (Karl Ritter von Frisch) นักวิทยาศาสตร์ชาวออสเตรีย เจ้าของรางวัลโนเบลปี 1973 ได้ค้นพบคำตอบว่า คุณผึ้งแสนขยันตัวนั้น จะกลับมาระบำด้วยสเต็ปซิกแซก (zigzag) ให้มิตรสหายดู โดยการระบำนั้นจะสามารถบอกแก่ผึ้งตัวอื่น ๆ ว่า อาหารอยู่ในทิศทางใด และมีระยะที่ไกลไปจากรังเท่าไหร่ ซึ่งจากการสื่อสารที่แหวกแนวนี้เอง ทำให้พวกผองผึ้งสามารถระดมพลกันไปขนอาหารได้อย่างถูกต้องนั่นแหละคือคำต้องว่าทำไมถึงมี โปรโตคอลที่ชื่อ Zigbee

          เทคโนโลยี Zigbee จึงถูกสร้างขึ้นมาเพื่อการสื่อสารไร้สายที่ไร้ขีดจำกัดมากขึ้นกว่าเทคโนโลยีไร้สายแบบเดิม ๆ เช่น Bluetooth Wifi หรือ Z-Wave ในแง่ของขนาดเครือข่าย เทคโนโลยี Zigbee มีความยืดหยุ่นที่จะตอบสนองความต้องการของคุณได้มากที่สุด เพราะสามารถเชื่อมต่อได้ถึง 65,000 เซ็นเซอร์ ในขณะที่เทคโนโลยี Z-Wave เชื่อมต่อได้สูงสุดแค่ 230 เซ็นเซอร์ ในแง่ของความแรงของสัญญาญเทคโนโลยี Zigbee สามารถมี range ได้ถึง 300 เมตร ในขณะที่เทคโนโลยี Bluetooth สามารถไปไกลได้สูงสุดแค่ 10 เมตร และเทคโนโลยี Wifi สามารถไปไกลได้สูงสุดแค่ 100 เมตร นอกจากนั้น เทคโนโลยี Zigbee ยังประหยัดพลังงานสูงที่สุดในเทคโนโลยี ไร้สายทั้งหมด ด้วยอุปกรณ์บางชิ้นสามารถใช้ถ่านนาฬิกาเล็ก ๆ เพียงหนึ่งก้อน และมีอายุใช้งานไปได้เป็นปีเลยทีเดียว

www.smile-digital.com/blog/-what-is-zigbee/

วันพฤหัสบดีที่ 4 พฤษภาคม พ.ศ. 2560

บุคคลที่ควรบูชา

ภิกษุทั้งหลาย ! บุคคล ๘ จำพวกเหล่านี้ เป็นผู้ควรแก่ของบูชา ควรแก่ของต้อนรับ ควรแก่ของทำบุญ

ควรทำอัญชลี เป็นเนื้อนาบุญของโลก ไม่มีนาบุญอื่นยิ่งกว่า. ๘ จำพวกอะไรบ้างเล่า ?

๘ จำพวก คือ :-
(๑) พระโสดาบัน
(๒) พระผู้ปฏิบัติเพื่อทำให้แจ้งโสดาปัตติผล
(๓) พระสกทาคามี
(๔) พระผู้ปฏิบัติเพื่อทำให้แจ้งสกทาคามิผล
(๕) พระอนาคามี
(๖) พระผู้ปฏิบัติเพื่อทำให้แจ้งอนาคามิผล
(๗) พระอรหันต์
(๘) พระผู้ปฏิบัติเพื่อความเป็นอรหันต์

ภิกษุทั้งหลาย ! บุคคล ๘ จำพวกเหล่านี้แล เป็นผู้ควรแก่ของบูชา ควรแก่ของต้อนรับ ควรแก่ของทำบุญ
ควรทำอัญชลี เป็นเนื้อนาบุญของโลกไมมี่นาบุญอื่นยิ่งกว่า.

“ผู้ปฏิบัติแล้ว ๔ จำพวกและผู้ตั้งอยู่ในผลแล้ว ๔ จำพวกนี่แหละ ! สงฆ์ที่เป็นคนตรง,
เป็นผู้ตั้งมั่นแล้วในปัญญาและศีล ย่อมกระทำให้เกิดบุญอื่นเนื่องด้วยอุปธิ แก่มนุษย์ทั้งหลาย 
ผู้มีความต้องการด้วยบุญ กระทำการบูชาอยู่ ทานที่ให้แล้วในสงฆ์ จึงมีผลมาก”.

ปฐมธรรม หน้า ๑๕๒
(ไทย) อฏฐก. อํ. ๒๓/๒๓๐/๑๔๙. 
(บาลี) อฏฐก. อํ. ๒๓/๓๐๑/๑๔๙

วันพุธที่ 26 เมษายน พ.ศ. 2560

car crash

ตัวอย่างเช่น

"I crash my car" แปลตรงตัวคือ "ฉันทำให้รถของฉันกระแทก" แปลสวยๆก็คือ "ฉันขับรถชน"


ถ้าจะบอกว่าฉันขับรถชนอะไร ให้ใส่ into ตามหลัง

ฉันขับรถชนต้นไม้
I crashed my car into a tree.

นอกจากคำว่า Car Crash แล้วยังมีอีกคำที่ความหมายใกล้เคียงกันนั่นคือ Car Accident ซึ่งเป็น Noun เหมือนกัน

จะต้องทำอะไรถ้าเกิดคุณขับรถชน
What to do if you have a car accident? 


ถ้าคุณไม่เคยประสบอุบัติเหตุรถยนต์เลย คุณน่ะโชคดี
If you haven't been in a car accident, you are lucky.


วันจันทร์ที่ 24 เมษายน พ.ศ. 2560

Traditional web hosting VS. AWS VS. Wix.com VS. CMS

  • Wix.com is PaaS with a very easy and beautiful web app development (CMS) tool but has no DBMS.
  • Traditional web hosting is cheaptest with only web admin tool and traditional CMS (WordPress, Drupal, Joomla) but free domain name and MySQL. It is most expensive due to data-out charging.
  • AWS is IaaS with the highest availability (about 99.95% compared to traditional one, 99.9%).


วันอังคารที่ 18 เมษายน พ.ศ. 2560

Capture-recapture sampling method

The capture-recapture method serves to estimate a quantity (e.g. people with a specific trait) from a population.In epidemiology it is most commonly used to conduct measurements in a population that you cannot count completely.
The technique derives from counting animals, where a certain amount of animals where captured and marked and then released again. After a certain period of time a second sample of the animals were taken. The amount of marked animals in this second sample allows to draw conclusions about the true size of the population. (https://wiki.ecdc.europa.eu/fem/w/wiki/1218)




วันพฤหัสบดีที่ 13 เมษายน พ.ศ. 2560