Поставил вчера свеженькую Убунту 9.10 все просто мего.. пока тока всплыл один косяк с Empathy, траблы с кодировкой у юзеров с кем чатился. Немножко потупил.. ибо было час ночи.. птом вспомнил что в учетной записи Аськи нужно кодировку сменить c UTF8 на cp1251)
“Правка” >”Учетные записи” > “Дополнительно”
People if one sunshine day your doctrine cli stops create database, first of all you should delete your old models that can stay in your models and base models directories. And then repeat your operation.
Разрабатывая программное обеспечение и помогая другим делать это, мы стараемся найти наилучшие подходы к разработке. В процессе этой работы мы пришли к тому, чтобы ценить:
- Личности и их взаимодействия выше, чем процессы и инструменты.
- Работоспособное программное обеспечение выше, чем обширную документацию.
- Сотрудничество с заказчиком выше, чем переговоры по контрактам.
- Умение реагировать на изменения выше, чем следование плану.
Подробнее »
Дизайн сайта не мой, разработан сторонней конторой. За мной верстка, и программинг.
линк на сайт

Created some base interface classes that implements Application architecture into ExtJS script.
Base function of this architecture is:
- Modularity
- Auto-adding modules to the application
- Incapsulation
Example
Подробнее »
Нашел седня интересный выход на тему релевантности в таблицах не MyISAM в MySQL.
Запрос реализует выборку количества вхождений подстроки в строку.
Вообщем вот такой вот простенький запросик:
select *,
(length(lower(title)) - length(replace (lower(title), 'sql', ''))) /
length('sql') title_i,
(length(lower(body)) - length(replace (lower(body), 'sql', ''))) / length
('sql') body_i
from articles
order by title_i desc,
body_i desc
Логика этой байды собственно такая.. берем длинну строки в которой ищем отнимаем от нее длинну этой же строки но из которой удалено искомое слово и делем на длинну искомого слова. В итоге получаем количество вхождений данного слова в строку
1 Installation
- Go to the Facebook developer’s page http://www.facebook.com/developers/createapp.php and create new application. And get api_key and secret_key of your application.
- Fill fields Connect URL, Post-Authorize Redirect URL and Post-Authorize URL with url to your site which will callback after user registration and which will get GET data from Facebook with user session_key, secret_key, sig and user_id which will be used for user authentication in future.
2 Understanding of Facebook API methods
Download Facebook API library for PHP from http://svn.facebook.com/svnroot/platform/clients/packages/facebook-platform.tar.gz
Here is example of how code is work:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| include_once(“facebook/facebook.php"); //path to the facebook library
$facebook = new Facebook($api_key, secret_key); //api and secret key of your application which you get in chapter 1.1
$facebook->set_user($session_key, $secret_key, $sig) //session_key, secret_key and sig of user which you get after user registered your Facebook application in chapter 1.2
do {
switch($data['type']) {
case "post_photos":
foreach($data['file'] as $file) {
$res = $facebook->api_client->photos_upload($file['tmp_name'],null,$data['title'],$conf['userid']);
}
break;
case "post_status":
$res = $facebook->api_client->users_setStatus($data['message'],$conf['userid']);
break;
case "post_blog":
$res = $facebook->api_client->notes_create($data['title'],$data['message'],$conf['userid']);
break;
case "post_microblog":
$res = $facebook->api_client->stream_publish($data['message'],$data['attachment'],$data['links'],$conf['userid'],$conf['userid']);
break;
default:
break;
}
} while(!$res); |
There is 4 types of posting on facebook, each of them has specific function
Posting photos:
$facebook->api_client->photos_upload($file['tmp_name'],null,$title,$user_id);
- $file['tmp_name'] – path to the image on server filesystem
- $title – title of photo
- $user_id – user on whose wall photo will be posted. By default it’s must be user_id of user who post a photo(to post on his wall)
Posting status:
$facebook->api_client->users_setStatus($message,$user_id);
- $message – status message
- $user_id – user on whose wall photo will be posted. By default it’s must be user_id of user who post a photo(to post on his wall)
Posting blog:
$facebook->api_client->notes_create($title,$’message,$user_id);
- $title – title of post
- $message – post message
- $user_id – user on whose wall photo will be posted. By default it’s must be user_id of user who post a photo(to post on his wall)
Posting stream:
$facebook->api_client->stream_publish($message,$attachment,$links,$user_id_target,$userid_actor);
- $message – post message
- $user_id_target – id of user on whose wall posting
- $userid_actor – id of user who posting
Attachments and link example:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| $attachment = array(
'name' => 'ninja cat',
'href' => 'http://www.youtube.com/watch?v=muLIPWjks_M',
'caption' => '{*actor*} uploaded a video to www.youtube.com',
'description' => 'a sneaky cat',
'properties' => array('category' => array(
'text' => 'pets',
'href' => 'http://www.youtube.com/browse?s=mp&t=t&c=15'),
'ratings' => '5 stars'),
'media' => array(array('type' => 'video',
'video_src' => 'http://www.youtube.com/v/fzzjgBAaWZw&hl=en&fs=1',
'preview_img' => 'http://img.youtube.com/vi/muLIPWjks_M/default.jpg?h=100&w=200&sigh=__wsYqEz4uZUOvBIb8g-wljxpfc3Q=',
'video_link' => 'http://www.youtube.com/watch?v=muLIPWjks_M',
'video_title' => 'ninja cat')));
$links = array(
array('text' => 'Upload a video',
'href' => 'http://www.youtube.com/my_videos_upload')); |
And one more thing. There can be trouble with connection to the Facebook API server so in example was used a loop which can repeat calling Facebook API until get an unswer from it.
Hope this helps.