>DansTonCode();

Tous les codes sourcespage 13

JavaScript
 12 Juin, 2016 à 01:30
#277
 if ($('#hdnGender').val() == "" || $('#hdnGender').val() == "notdisclosed") {

        $('#cboGender').val('notdisclosed');


    } else if ($('#hdnGender').val() == "Male") {
        $('#cboGender').val('Male');
    } else {

        $('#cboGender').val('Female');
    }
Java
 11 Juin, 2016 à 01:30
#276
   public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
      Player player = (Player)sender;
      if(commandLabel.equalsIgnoreCase("shout")) {
         if(args.length == 0) {
            sender.sendMessage(ChatColor.GRAY + "Not enough arguments! Syntax: /shout <message>");
         }

         if(args.length == 1) {
            Bukkit.broadcastMessage(ChatColor.RED + player.getName() + ChatColor.RED + " shouts: " + ChatColor.RED + args[0]);
         }

         if(args.length == 2) {
            Bukkit.broadcastMessage(ChatColor.RED + player.getName() + ChatColor.RED + " shouts: " + ChatColor.RED + args[0] + " " + args[1]);
         }

         if(args.length == 3) {
            Bukkit.broadcastMessage(ChatColor.RED + player.getName() + ChatColor.RED + " shouts: " + ChatColor.RED + args[0] + " " + args[1] + " " + args[2]);
         }

         if(args.length == 4) {
            Bukkit.broadcastMessage(ChatColor.RED + player.getName() + ChatColor.RED + " shouts: " + ChatColor.RED + args[0] + " " + args[1] + " " + args[2] + " " + args[3]);
         }

         if(args.length == 5) {
            Bukkit.broadcastMessage(ChatColor.RED + player.getName() + ChatColor.RED + " shouts: " + ChatColor.RED + args[0] + " " + args[1] + " " + args[2] + " " + args[3] + " " + args[4]);
         }

         if(args.length == 6) {
            Bukkit.broadcastMessage(ChatColor.RED + player.getName() + ChatColor.RED + " shouts: " + ChatColor.RED + args[0] + " " + args[1] + " " + args[2] + " " + args[3] + " " + args[4] + " " + args[5]);
         }

         if(args.length == 7) {
            Bukkit.broadcastMessage(ChatColor.RED + player.getName() + ChatColor.RED + " shouts: " + ChatColor.RED + args[0] + " " + args[1] + " " + args[2] + " " + args[3] + " " + args[4] + " " + args[5] + " " + args[6]);
         }

         if(args.length == 8) {
            Bukkit.broadcastMessage(ChatColor.RED + player.getName() + ChatColor.RED + " shouts: " + ChatColor.RED + args[0] + " " + args[1] + " " + args[2] + " " + args[3] + " " + args[4] + " " + args[5] + " " + args[6] + " " + args[7]);
         }

         if(args.length == 9) {
            Bukkit.broadcastMessage(ChatColor.RED + player.getName() + ChatColor.RED + " shouts: " + ChatColor.RED + args[0] + " " + args[1] + " " + args[2] + " " + args[3] + " " + args[4] + " " + args[5] + " " + args[6] + " " + args[7] + " " + args[8]);
         }

         if(args.length == 10) {
            Bukkit.broadcastMessage(ChatColor.RED + player.getName() + ChatColor.RED + " shouts: " + ChatColor.RED + args[0] + " " + args[1] + " " + args[2] + " " + args[3] + " " + args[4] + " " + args[5] + " " + args[6] + " " + args[7] + " " + args[8] + " " + args[9]);
         }

         if(args.length == 11) {
            Bukkit.broadcastMessage(ChatColor.RED + player.getName() + ChatColor.RED + " shouts: " + ChatColor.RED + args[0] + " " + args[1] + " " + args[2] + " " + args[3] + " " + args[4] + " " + args[5] + " " + args[6] + " " + args[7] + " " + args[8] + " " + args[9] + " " + args[10]);
         }

         if(args.length == 12) {
            Bukkit.broadcastMessage(ChatColor.RED + player.getName() + ChatColor.RED + " shouts: " + ChatColor.RED + args[0] + " " + args[1] + " " + args[2] + " " + args[3] + " " + args[4] + " " + args[5] + " " + args[6] + " " + args[7] + " " + args[8] + " " + args[9] + " " + args[10] + " " + args[11]);
         }

         if(args.length == 13) {
            Bukkit.broadcastMessage(ChatColor.RED + player.getName() + ChatColor.RED + " shouts: " + ChatColor.RED + args[0] + " " + args[1] + " " + args[2] + " " + args[3] + " " + args[4] + " " + args[5] + " " + args[6] + " " + args[7] + " " + args[8] + " " + args[9] + " " + args[10] + " " + args[11] + " " + args[12]);
         }

         if(args.length == 14) {
            Bukkit.broadcastMessage(ChatColor.RED + player.getName() + ChatColor.RED + " shouts: " + ChatColor.RED + args[0] + " " + args[1] + " " + args[2] + " " + args[3] + " " + args[4] + " " + args[5] + " " + args[6] + " " + args[7] + " " + args[8] + " " + args[9] + " " + args[10] + " " + args[11] + " " + args[12] + " " + args[13]);
         }

         if(args.length == 15) {
            Bukkit.broadcastMessage(ChatColor.RED + player.getName() + ChatColor.RED + " shouts: " + ChatColor.RED + args[0] + " " + args[1] + " " + args[2] + " " + args[3] + " " + args[4] + " " + args[5] + " " + args[6] + " " + args[7] + " " + args[8] + " " + args[9] + " " + args[10] + " " + args[11] + " " + args[12] + " " + args[13] + " " + args[14]);
         }

         if(args.length == 16) {
            Bukkit.broadcastMessage(ChatColor.RED + player.getName() + ChatColor.RED + " shouts: " + ChatColor.RED + args[0] + " " + args[1] + " " + args[2] + " " + args[3] + " " + args[4] + " " + args[5] + " " + args[6] + " " + args[7] + " " + args[8] + " " + args[9] + " " + args[10] + " " + args[11] + " " + args[12] + " " + args[13] + " " + args[14] + " " + args[15]);
         } else if(commandLabel.equalsIgnoreCase("bitzshout")) {
            sender.sendMessage(ChatColor.BLUE + "-========== " + ChatColor.GOLD + " BitzShout " + ChatColor.BLUE + " ==========-");
            sender.sendMessage(ChatColor.GOLD + "/bitzshout" + ChatColor.DARK_AQUA + " - " + ChatColor.BLUE + "Base command for BitzShout");
            sender.sendMessage(ChatColor.GOLD + "/shout " + ChatColor.GRAY + "<message>" + ChatColor.DARK_AQUA + " - " + ChatColor.BLUE + " Shouts a message to the server.");
            sender.sendMessage(ChatColor.BLUE + "-==================================-");
         }
      }

      return false;
   }
C++
 10 Juin, 2016 à 01:30
#275
	static const int Num = 5;
	class Recursive
	{
	public:
		long long result;
		Recursive(int WhatIveGot, int Count)
		{
			if ( !Count ) result = 1;
			if ( 0 >= WhatIveGot ) return;
			result *= WhatIveGot;
			new (this)Recursive(WhatIveGot-1, Count+1);
		}
	} a(Num, 0);

	std::wcout << L"Factorial(" << Num << L"): " << a.result << std::endl;