C++
01/07/2016 01:30:01
#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/06/2016 01:30:01
#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/06/2016 01:30:01
#294
if (comboBox.getText().equals("one") return "one"; else if (comboBox.getText().equals("two") return "two"; else return false;
Java
28/06/2016 01:30:01
#293
 if(plugin.getConfig().getBoolean("Enchant.log")){
          String time = String.format("[%tm/%td/%ty - %tH:%tM:%tS] ", new Date(), new Date(),new Date(),new Date(),new Date(),new Date());
          plugin.logToFile("[ENCHANT + Time" + " (" + time + " )" + event.getEnchanter() + "enchanted their " + event.getItem().getType().name().replace("DIAMOND_SWORD", "Diamond Sword").replace("DIAMOND_AXE", "Diamond Axe").replace("DIAMOND_PICKAXE", "Diamond Pickaxe").replace("DIAMOND_SPADE", "Diamond Spade").replace("DIAMOND_HELMET", "Diamond Helmet").replace("DIAMOND_CHESTPLATE", "Diamond Chestplate").replace("DIAMOND_LEGGINGS", "Diamond Leggings").replace("DIAMOND_BOOTS", "Diamond Boots").replace("IRON_SWORD", "Iron Sword").replace("IRON_AXE", "Iron Axe").replace("IRON_PICKAXE", "Iron Pickaxe").replace("IRON_SPADE", "Iron Spade").replace("IRON_HELMET",  "Iron Helmet").replaceAll("IRON_CHESTPLATE", "Iron Chestplate").replace("IRON_LEGGINGS", "Iron Leggings").replaceAll("IRON_BOOTS", ChatColor.GRAY+ "Iron Boots").replace("GOLD_SWORD", "Gold Sword").replace("GOLD_AXE", "Gold Axe").replace("GOLD_PICKAXE", "Gold Pickaxe").replace("GOLD_SPADE", "Gold Spade").replace("GOLD_HELMET", "Gold Helmet").replace("GOLD_CHESTPLATE", "Gold Chestplate").replace("GOLD_LEGGINGS", "Gold Leggings").replace("GOLD_BOOTS",  "Gold Boots").replace("CHAINMAIL_HELMET", ChatColor.DARK_PURPLE + "Chainmail Helmet").replace("CHAINMAIL_CHESTPLATE", "Chainmail Chestplate").replace("CHAINMAIL_LEGGINGS", "Chainmail Leggings").replace("CHAINMAIL_BOOTS", "Chainmail Boots").replace("WOODEN_SWORD", "Wooden Sword").replace("WOODEN_AXE",  "Wooden Axe").replace("WOODEN_PICKAXE", "Wooden Pickaxe").replace("WOODEN_SPADE", "Wooden Spade").replace("LEATHER_HELMET",  "Leather Helmet").replace("LEATHER_CHESTPLATE",  "Leather Chestplate").replace("LEATHER_LEGGINGS", "Leather Leggings").replace("LEATHER_BOOTS", "Leather Boots") + "with the following enchantments" + enchant.replace("DAMAGE_ALL", "Sharpness").replace("FIRE_ASPECT", "Fire Asepct").replace("KNOCKBACK", "Knockback").replace("LOOT_BONUS_MOBS",  "Looting").replace("DAMAGE_ARTHROPODS", "Bane of Arthropod").replace("DAMAGE_UNDEAD", "Smite").replace("SILK_TOUCH", "Silk Touch").replace("DIG_SPEED", "Efficiency").replace("DURABILITY","Unbreaking").replace("LOOT_BONUS_BLOCKS", "Fortune").replace("ARROW_DAMAGE", "Power").replace("ARROW_KNOCKBACK", "Punch").replace("ARROW_FIRE", "Flame").replace("ARROW_INFINITE", "Infinity").replace("PROTECTION_ENVIRONMENTAL", "Protection").replace("PROTECTION_FIRE", "Fire Protection").replace("PROTECTION_EXPLOSIONS", "Blast Protection").replace("PROTECTION_PROJECTILE", "Projectile Protection").replace("WATER_WORKER", "Respiration").replace("Enchantment.OXYGEN", "Aqua Affinity").replace("PROTECTION_FALL", "Feather Falling") + " which cost:" + event.getExpLevelCost() + "exp!");
        }
C++
26/06/2016 01:30:01
#291
int i, sum = 0;
for(i = 0; i < 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10; i ++) {
  sum += 1;
}
printf("sum: %d", 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10);
En poursuivant votre navigation sur ce site, vous acceptez l’utilisation de Cookies pour réaliser des statistiques anonymes de visites.
[x]
[Y] J'accepte
[N] Non merci
~$ 
_