пятница, 29 ноября 2013 г.

~ Before now, I always use MP3 player as USB data drive. (USB Flash drive) And I like it simple way.
When my player connected with MTP protocol, I am afraid that my files may be duplicated to my PC, or files at player may be deleted. Also I like work with folders (as tree architecture), not playlists.

Yesterday I find nice (but very slowly) MTP client for my Ubuntu 13.04: gMTP. http://gmtp.sourceforge.net/

~ I can test Ubuntu 13.10 at laptop and now happy: Wi-Fi adapter as Broadcom BCM-4313, work fine without configurating. Installed distributive use driver with name wl.

понедельник, 25 ноября 2013 г.

Use select.select and select.poll for wait ready file or socket description.

Some about REST

Many peoples say about REST. And I want only save some keynotes for myself.
There are protocol for communacation beyond server and you client application.

Favorite methods:
POST - for create new resourse
DELETE - delete resourse
GET - for get resourse

Other information must contain in HTTP Headers. There are: format, encoding and something else.

For example:
curl -XDELETE http://localhost/api/v1.0/users/123

curl -XGET http://localhost/api/v1.0/users/

curl -H 'Accept: text/csv' http://localhost/api/v1.0/books -o books.csv
Get all books in csv format and safe for books.csv file.

curl -XPOST -H 'Content-type: application/json' -d '{"name":"Alex"}' \
  http://localhost/api/v1.0/users -D -
Create new user (content data in -d parameter) and print response to STDOUT.
-D - print to STDOUT

Next for example:
curl -XPOST -H 'Content-type: application/json' \
  -d '{"subject":"Good news, everyone!","body":"..."}' \

Thank for http://eax.me/rest/

Интересные ссылки о создании сетевых и социальных игр:

Интересные ссылки о создании сетевых и социальных игр: