>DansTonCode();

Tous les codes sourcespage 6

C++
  1 July, 2016 à 01:30
#296
/* ... */

/* BUG: Remember to always include the following three header files anytime you use inet_ntop otherwise
 * you get segmentation fault!!!
 */
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>

/* ... */
PHP
 30 June, 2016 à 01:30
#295
    $result = (Db::getInstance()->Execute('                                         
      UPDATE `'._DB_PREFIX_.'category`                                              
      SET `position`= `position` '.($way ? '- 1' : '+ 1').'                         
      WHERE `position`                                                              
      '.($way                                                                       
        ? '> '.(int)($movedCategory['position']).' AND `position` <= '.(int)($position)
        : '< '.(int)($movedCategory['position']).' AND `position` >= '.(int)($position)).'
      AND `id_parent`='.(int)($movedCategory['id_parent']))                         
    AND Db::getInstance()->Execute('                                                
      UPDATE `'._DB_PREFIX_.'category`                                              
      SET `position` = '.(int)($position).'                                         
      WHERE `id_parent` = '.(int)($movedCategory['id_parent']).'                    
      AND `id_category`='.(int)($movedCategory['id_category']))); 
Java
 29 June, 2016 à 01:30
#294
if (comboBox.getText().equals("one") return "one"; else if (comboBox.getText().equals("two") return "two"; else return false;