суббота, 31 июля 2010 г.

WinHTTP Sessions Overview (Windows)

WinHTTP Sessions Overview (Windows)

Windows Sockets 2 (Windows)

Windows Sockets 2 (Windows)

Win32 Developer - Tutorial 3 Using edit boxes, buttons, and other window asset using the Win32 API

Win32 Developer - Tutorial 3 Using edit boxes, buttons, and other window asset using the Win32 API

Win32 Developer - Win32 programming tutorial and Winsock tutorials using Visual Studio.net C++

Win32 Developer - Win32 programming tutorial and Winsock tutorials using Visual Studio.net C++

понедельник, 26 июля 2010 г.

xdebug trace file parser

xdebug trace file parser

установка xdebugtoolkit

PHP Club форумы: - xdebugtoolkit 0.1.3: "xdebugtoolkit 0.1.3

Помаленьку мой проект обретает человеческие черты, так что его уже не так стыдно показывать

На данный момент проект xdebugtoolkit содержит:

1. главную утилиту для построения деревьев вызовов из файлов xdebug'а - cg2dot
2. вспомогательную утилиту для разбивания агрегированных файлов - cgsplit


Утановка вместе с xdot заключается в следующем:

1. Забираете из перозитория последний тег:

code:svn co http://xdebugtoolkit.googlecode.com/svn/tags/0.1.3/xdebugtoolkit/ xdebugtoolkit


2. Забираете xdot

code:svn co http://jrfonseca.googlecode.com/svn/trunk/xdot/ xdot


3. Устанавливаете требуемые для xdot компоненты:

code:apt-get install python-gtk2 graphviz


для примера можно сразу запустить:

code:xdebugtoolkit/cg2dot.py -t0 xdebugtoolkit/fixtures/2.php.cg | xdot/xdot.py -


Надеюсь, на чистой машине все сработает. Если не сработает, присылайте, пожалуйста, тексты ошибок (для этого может потребоваться запускать cg2dot.py и xdot не через pipe, а по отдельности c промежуточной записью в файл и чтением из него).
Мне удавалось запускать эту связку и на винде, но не обошлось без танцев с бубном по поиску нужных версий всяких pycairo, pygtk, и т.д.

Оно уже сейчас довольно функциональное, но хочется узнать мнение, чего еще не хватает для нормальной работы. Выслушаю любые пожелания.

Отправлено через панель инструментов Google:"

пятница, 23 июля 2010 г.

Как получить имя класса из наследуемого статического метода в PHP

PHP: get classname from static call in extended class. - Stack Overflow:

"__CLASS__ always returns the name of the class in which it was used, so it's not much help with a static method. If the method wasn't static you could simply use get_class($this). e.g.

class Action {
public function n(){
echo get_class($this);
}

}

class MyAction extends Action {

}

$foo=new MyAction;

$foo->n(); //displays 'MyAction'

Late static bindings, available in PHP 5.3+

Now that PHP 5.3 is released, you can use late static bindings, which let you resolve the target class for a static method call at runtime rather than when it is defined.

While the feature does not introduce a new magic constant to tell you the classname you were called through, it does provide a new function, get_called_class() which can tell you the name of the class a static method was called in. Here's an example:

Class Action {
public static function n() {
return get_called_class();
}
}


class MyAction extends Action {

}


echo MyAction::n(); //displays MyAction

Отправлено через панель инструментов Google:"

среда, 21 июля 2010 г.

Как сделать чтобы xdebug не ломал Apache при каждом запуске



"I got a solution working for Vista using a combination of the above so if this helps anyone here goes...

Eclipse Europa - Version: 3.3.2 Build id: M20080221-1800

XAMPP - win32 version 1.6.8 installer

xdebug - php_xdebug-2.0.2-5.2.5.dll

Contents of ~/xampp/apache/bin/php.ini

[Zend] ;zend_extension_ts = 'C:\xampp\php\zendOptimizer\lib\ZendExtensionManager.dll' ;zend_extension_manager.optimizer_ts = 'C:\xampp\php\zendOptimizer\lib\Optimizer' ;zend_optimizer.enable_loader = 0 ;zend_optimizer.optimization_level=15 ;;zend_optimizer.license_path = ; Local Variables: ; tab-width: 4 ; End:

[XDebug] ;; Only Zend OR (!) XDebug zend_extension_ts='C:\xampp\php\ext\php_xdebug-2.0.2-5.2.5.dll' xdebug.remote_enable=true xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000 xdebug.remote_handler=dbgp xdebug.profiler_enable=1 xdebug.profiler_output_dir='C:\xampp\tmp'

And the absolutely crucial bit for me....

;extension=php_xdebug-2.0.2-5.2.5.dll

That's right ! Comment out the above line.

Hope this helps

Отправлено через панель инструментов Google:"

суббота, 17 июля 2010 г.

Я хочу

чтобы люди взглянув или пообщавшись со мной говорили "Да, это по настоящему сильный и независимый человек!"

понедельник, 12 июля 2010 г.

Некое подобие работы с базой SugarCRM

SugarCRM Users Logic Hooks - Design Tips: "SugarCRM Users Logic Hooks

Custom Logic Hooks are a great way of adding functionality to SugarCRM. The logic hook below was used to establish a default role for new users. This was required for the automatic LDAP Users functionality that is built into SugarCRM. This logic hook was used with SugarCRM CE 5.2 in a production environment.
view source
print?
01.
view source
print?
01.id}'';
14. $result = $bean->db->query($query, true);
15.
16. // Only update role when creating a new user.
17. if ($bean->db->getRowCount($result) == 0 && $_REQUEST['module'] == 'Users' && $_REQUEST['action'] == 'Save') {
18.
19. $query = 'SELECT id FROM acl_roles WHERE name = '$role_name'';
20. $result = $bean->db->query($query, true);
21.
22. if($bean->db->getRowCount($result) == 1) {
23.
24. $row = $bean->db->fetchByAssoc($result);
25. $bean->load_relationship('aclroles');
26. $bean->aclroles->add($row['id']);
27. require_once('modules/ACL/install_actions.php');
28.
29. } else {
30. sugar_die('Role does not exist! Contact the system administrator');
31. }
32. }
33. }
34.
35.}
36.?>

Отправлено через панель инструментов Google:"