/** * lowercase letters */
        $this->store['upper_Spec'] = array( *cut* );
        /** * uppercase letters */
        $this->store['lower_Spec'] = array( *cut* );
      
                    } else {
                      $errmsg='An unknown error occured.';
                    }
                  } else {
                    $errmsg='The passwords you entered do not match';
                  }
                } else {
                  $errmsg='Password has to be at least 8 characters long.';
                }
              } else {
                $errmsg='The email you entered is already in our database.';
              }
            } else {
              $errmsg='Please enter your email address.';
            }
          } else {
            $errmsg='Please enter your first name and your last name.';
          }
        } else {
        (...)
      
        // Happy debugging, suckers
        # define true (rand() > 10)
      
Share Bitcoins and tip people by e-mail at https://cryptotip.it.

+1

 public StickyRouting getStickyRouting(String groupName, String sbPin, String ccNumber) {
        StickyRouting result = null;

        boolean isGroupNameEmpty = StringUtils.isEmpty(groupName) ? true : false;
        boolean isCcNumberEmpty = StringUtils.isEmpty(ccNumber) ? true : false;
        boolean isSbPinEmpty = StringUtils.isEmpty(sbPin) ? true : false;
        ...
}
 

anonymous

0

// somedev1 -  6/7/02 Adding temporary tracking of Login screen
// somedev2 -  5/22/07 Temporary my ass
 

anonymous

0

$(pagina+' .colecao div.img:first-child').next().next().addClass('img01');
$(pagina+' .colecao div.img:first-child').next().next().next().addClass('img02');
$(pagina+' .colecao div.img:first-child').next().next().next().next().addClass('img03');
$(pagina+' .colecao div.img:first-child').next().next().next().next().next().addClass('img04');
$(pagina+' .colecao div.img:first-child').next().next().next().next().next().next().addClass('img05');
$(pagina+' .colecao div.img:first-child').next().next().next().next().next().next().next().addClass('img06');
$(pagina+' .colecao div.img:first-child').next().next().next().next().next().next().next().next().addClass('img07');
 

anonymous

0

$full = ($result_user['status'][$key] == 'Accepted') ? '' : '';
 

anonymous

0

updateParentChilds = function() {
    if ($(this).parent().hasClass('checked')) {
        $(this).parent().parent().parent().next().children().children().children().children().addClass('checked');
        $(this).parent().parent().parent().next().children().children().children().children().children().prop('checked', true);
    } else {
        $(this).parent().parent().parent().next().children().children().children().children().removeClass('checked');
        $(this).parent().parent().parent().next().children().children().children().children().children().prop('checked', false);
    }
};
updateChecked = function() {
    if ($(this).parent().hasClass('checked')) {
       $(this).parent().parent().parent().parent().parent().parent().children().children().children().addClass('checked');
       $(this).parent().parent().parent().parent().parent().parent().children().children().children().children().prop('checked', true);
    } else {
        $(this).parent().parent().parent().parent().parent().parent().children().children().children().removeClass('checked');
        $(this).parent().parent().parent().parent().parent().parent().children().children().children().children().prop('checked', false);
    }
};
 

anonymous

+2

function getOrderItemId(e)
{
    order_item_id = $($(e.currentTarget).parent().parent().parent().prev().children().get(3)).html();
    return order_item_id;
}
 

anonymous

0

/* 
 * XXX Android OS code changed between 2.2 to 2.3 in HorizontalScrollView.onTouchEvent(MotionEvent) (Line 507-508 in
 * 2.3.3) when clicking on empty areas of the view to not bubble up to the parent view nor get handled locally. This
 * causes 2.3+ devices to not be able to go back to the desktop as you clicked on those empty areas. Here we check
 * if HorizontalScrollView handled the event and if it did we make sure that it didn't eat our event. If so, we
 * notify local listeners and if that doesn't work, we "bubble up" the event to the parent by returning false.
 * 
 * Another reason why some Google developers should be taken off the Android OS project
 */
 

anonymous

+1

function selectCategory(num) {
	curCategory = num;
	if(num == 1) {
		$('#tr td:first').removeClass().addClass('t1').next().removeClass().addClass('t2').next().removeClass().addClass('t3').next().removeClass().addClass('t4').next().removeClass().addClass('t5').next().removeClass().addClass('t4').next().removeClass().addClass('t5');
		$('#mr td:first').removeClass().addClass('tc1').next().removeClass().addClass('tc2').next().removeClass().addClass('tc3').next().removeClass().addClass('tc4').next().removeClass().addClass('tc5').next().removeClass().addClass('tc4').next().removeClass().addClass('tc5');
		$('#br td:first').removeClass().addClass('tb1').next().removeClass().addClass('tb2').next().removeClass().addClass('tb3').next().removeClass().addClass('tb4').next().removeClass().addClass('tb5').next().removeClass().addClass('tb4').next().removeClass().addClass('tb5');		
	}
	else if(num == 2) {
		$('#tr td:first').removeClass().addClass('t5').next().removeClass().addClass('t4').next().removeClass().addClass('t1').next().removeClass().addClass('t2').next().removeClass().addClass('t3').next().removeClass().addClass('t4').next().removeClass().addClass('t5');
		$('#mr td:first').removeClass().addClass('tc5').next().removeClass().addClass('tc4').next().removeClass().addClass('tc1').next().removeClass().addClass('tc2').next().removeClass().addClass('tc3').next().removeClass().addClass('tc4').next().removeClass().addClass('tc5');
		$('#br td:first').removeClass().addClass('t1').next().removeClass().addClass('tb4').next().removeClass().addClass('tb0').next().removeClass().addClass('tb2').next().removeClass().addClass('tb3').next().removeClass().addClass('tb4').next().removeClass().addClass('tb5');
	}
	else if(num == 3) {
	      //$('#tr td:first').removeClass().addClass('t1').next().removeClass().addClass('t2').next().removeClass().addClass('t3').next().removeClass().addClass('t4').next().removeClass().addClass('t5').next().removeClass().addClass('t4').next().removeClass().addClass('t5');
		//$('#mr td:first').removeClass().addClass('tc1').next().removeClass().addClass('tc2').next().removeClass().addClass('tc3').next().removeClass().addClass('tc4').next().removeClass().addClass('tc5').next().removeClass().addClass('tc4').next().removeClass().addClass('tc5');
		//$('#br td:first').removeClass().addClass('tb1').next().removeClass().addClass('tb2').next().removeClass().addClass('tb3').next().removeClass().addClass('tb4').next().removeClass().addClass('tb5').next().removeClass().addClass('tb4').next().removeClass().addClass('tb5');
		
		$('#tr td:first').removeClass().addClass('t5').next().removeClass().addClass('t4').next().removeClass().addClass('t5').next().removeClass().addClass('t4').next().removeClass().addClass('t1').next().removeClass().addClass('t2').next().removeClass().addClass('t3');
		$('#mr td:first').removeClass().addClass('tc5').next().removeClass().addClass('tc4').next().removeClass().addClass('tc5').next().removeClass().addClass('tc4').next().removeClass().addClass('tc1').next().removeClass().addClass('tc2').next().removeClass().addClass('tc3');
		$('#br td:first').removeClass().addClass('t1').next().removeClass().addClass('tb4').next().removeClass().addClass('tb5').next().removeClass().addClass('tb4').next().removeClass().addClass('tb0').next().removeClass().addClass('tb2').next().removeClass().addClass('tb3');
	}
}
 

anonymous

+1

int getElement(int index, vector<int> arr){
  int result;
  for(int i = 0; i < arr.size(); i++) {
    result = arr[i];
    if(i == index) {
      break;
    }
  }

  return result;
}
 

+2

// @codingStandardsIgnoreStart
//"Identifier;Opt-In;email;sms;Fax;Password;uid;username;game;cid;server;login;Language;Hash;Betakey;Betakey2;Gutscheincode;Spiel"
$entry = "all_{$langCode}_{$email};Wahr;{$email};;;;;\"{$name}\";;;;;{$language};;;;;{$newsletterName}".PHP_EOL;
// @codingStandardsIgnoreEnd
 

+1

// I dedicate all this code, all my work, to my wife, Darlene, who will 
// have to support me and our three children and the dog once it gets 
// released into the public.
 

+4

Thread.sleep(4000); //make it look like work is being done
 

anonymous

+5

void get_tomorrow_date( struct timeval *date )
  {
    sleep( 86400 ); // 60 * 60 * 24
    gettimeofday( date, 0 );
  }
 

anonymous

0

#This guy that worked for us wanted to create an object, so he made a console.log of the var from the tutorial and tried to rebuild the object LITERALLY as it appeared on the console. the guy no longer works for us

    var labels = "[";
    $.each(fields_array, function(index, value) {
        if(index === 0) {
            labels += "{label:'" + value + "'}";
        } else {
            labels += ", {label:'" + value + "'}";
        }
    });
    labels += "]";
 

anonymous

+2

if(isCompleted == true)
{
    return true;
}
else
{
    return false;
}
 

anonymous

+1

if (lName=='O'Reily') {
   sql = sql+ "O''Reily";
}
else {
   sql = sql+ lName;
}
 

+1

if(strpos($raw_filename, '1080_') === false){

}else{

// .. 150 lines of code

}
 

anonymous

0

    public static Language detect(Collection<Page> pages){
        if(pages.isEmpty()){
            return null;
        }
        // TODO: there are probably more languages than this one:
        return POLISH_LANGUAGE;
    }
 

anonymous

-1

      $debitor = str_replace('A','1',$debitor);
      $debitor = str_replace('B','2',$debitor);
      $debitor = str_replace('C','3',$debitor);      
      $debitor = str_replace('D','4',$debitor);
      $debitor = str_replace('E','5',$debitor);
      $debitor = str_replace('F','6',$debitor);
      $debitor = str_replace('G','7',$debitor);      
      $debitor = str_replace('H','8',$debitor);
      $debitor = str_replace('I','9',$debitor);
      $debitor = str_replace('J','1',$debitor);
      $debitor = str_replace('K','2',$debitor);      
      $debitor = str_replace('L','3',$debitor);
      $debitor = str_replace('M','4',$debitor);
      $debitor = str_replace('N','5',$debitor);
      $debitor = str_replace('O','6',$debitor);      
      $debitor = str_replace('P','7',$debitor);
      $debitor = str_replace('Q','8',$debitor);
      $debitor = str_replace('R','9',$debitor);      
      $debitor = str_replace('S','1',$debitor);
      $debitor = str_replace('T','2',$debitor);
      $debitor = str_replace('U','3',$debitor);
      $debitor = str_replace('V','4',$debitor);      
      $debitor = str_replace('W','5',$debitor);
      $debitor = str_replace('X','6',$debitor);
      $debitor = str_replace('Y','7',$debitor);
      $debitor = str_replace('Z','8',$debitor); 
 

anonymous

-4

public int hashCode()
{
  int prime = 31;
  int result = 1;
  result = 31 * result + this.id;
  result = 31 * result + this.subType;
  return result;
}
 

-1

while (a = b) {
    a = c;
} 

//if c = b you get an infinite loop champ ... which happened and broke the server
 

anonymous

+2

/**
   * Returns if the response should be considered successful
   *
   * @return Boolean indicating if the request was successful
   * @see isError()
   */
  public function isSuccess()
  {
    return in_array((int)($this->getCode() / 100), array(2));
  }
 

anonymous

0

if(isset($result['result'])) {
	$this->session->set_userdata('import_result', $result);
	redirect('view/import');
} elseif (isset($result['error'])) {
	$this->session->set_userdata('import_result', $result);
	redirect('view/import');
} elseif (isset($result['success'])) {
	$this->session->set_userdata('import_result', $result);
	redirect('view/import');
}
 

anonymous

+8

public static int getLenght(String word) {
    int j=0;
    for (int i = 0; i < word.length(); i++) {
         j++;
    }
    return j;
}
 

anonymous

+3

f(args.length == 0) {
            p.sendMessage(ChatColor.RED + "Correct Usage: /DelEnchantment <Enchantment>");
         } else {
            Map Enchants;
            if(!args[0].equalsIgnoreCase("sharpness") && !args[0].equalsIgnoreCase("sharp")) {
               if(!args[0].equalsIgnoreCase("fireaspect") && !args[0].equalsIgnoreCase("fire")) {
                  if(!args[0].equalsIgnoreCase("knockback") && !args[0].equalsIgnoreCase("knock")) {
                     if(args[0].equalsIgnoreCase("smite")) {
                        if(args.length == 1) {
                           Enchants = pi.getItemInHand().getEnchantments();
                           if(Enchants.containsKey(Enchantment.DAMAGE_UNDEAD)) {
                              pi.getItemInHand().removeEnchantment(Enchantment.DAMAGE_UNDEAD);
                              p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                           } else if(pi.getItemInHand().getType() == Material.AIR) {
                              p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                           } else {
                              p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                           }
                        }
                     } else if(!args[0].equalsIgnoreCase("baneofarthropods") && !args[0].equalsIgnoreCase("bane")) {
                        if(!args[0].equalsIgnoreCase("looting") && !args[0].equalsIgnoreCase("loot")) {
                           if(!args[0].equalsIgnoreCase("protection") && !args[0].equalsIgnoreCase("prot")) {
                              if(!args[0].equalsIgnoreCase("fireprotection") && !args[0].equalsIgnoreCase("fireprot")) {
                                 if(!args[0].equalsIgnoreCase("blastprotection") && !args[0].equalsIgnoreCase("blastprot")) {
                                    if(!args[0].equalsIgnoreCase("projectileprotection") && !args[0].equalsIgnoreCase("projprot")) {
                                       if(!args[0].equalsIgnoreCase("featherfalling") && !args[0].equalsIgnoreCase("ff")) {
                                          if(!args[0].equalsIgnoreCase("respiration") && !args[0].equalsIgnoreCase("resp")) {
                                             if(!args[0].equalsIgnoreCase("aquaaffinity") && !args[0].equalsIgnoreCase("aqua")) {
                                                if(!args[0].equalsIgnoreCase("thorns") && !args[0].equalsIgnoreCase("thorn")) {
                                                   if(!args[0].equalsIgnoreCase("Efficiency") && !args[0].equalsIgnoreCase("efc")) {
                                                      if(!args[0].equalsIgnoreCase("silktouch") && !args[0].equalsIgnoreCase("silk")) {
                                                         if(!args[0].equalsIgnoreCase("fortune") && !args[0].equalsIgnoreCase("fort")) {
                                                            if(!args[0].equalsIgnoreCase("unbreaking") && !args[0].equalsIgnoreCase("unbreak")) {
                                                               if(args[0].equalsIgnoreCase("power")) {
                                                                  if(args.length == 1) {
                                                                     Enchants = pi.getItemInHand().getEnchantments();
                                                                     if(Enchants.containsKey(Enchantment.ARROW_DAMAGE)) {
                                                                        pi.getItemInHand().removeEnchantment(Enchantment.ARROW_DAMAGE);
                                                                        p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                                                                     } else if(pi.getItemInHand().getType() == Material.AIR) {
                                                                        p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                                                                     } else {
                                                                        p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                                                                     }
                                                                  }
                                                               } else if(args[0].equalsIgnoreCase("punch")) {
                                                                  if(args.length == 1) {
                                                                     Enchants = pi.getItemInHand().getEnchantments();
                                                                     if(Enchants.containsKey(Enchantment.ARROW_KNOCKBACK)) {
                                                                        pi.getItemInHand().removeEnchantment(Enchantment.ARROW_KNOCKBACK);
                                                                        p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                                                                     } else if(pi.getItemInHand().getType() == Material.AIR) {
                                                                        p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                                                                     } else {
                                                                        p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                                                                     }
                                                                  }
                                                               } else if(args[0].equalsIgnoreCase("flame")) {
                                                                  if(args.length == 1) {
                                                                     Enchants = pi.getItemInHand().getEnchantments();
                                                                     if(Enchants.containsKey(Enchantment.ARROW_FIRE)) {
                                                                        pi.getItemInHand().removeEnchantment(Enchantment.ARROW_FIRE);
                                                                        p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                                                                     } else if(pi.getItemInHand().getType() == Material.AIR) {
                                                                        p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                                                                     } else {
                                                                        p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                                                                     }
                                                                  }
                                                               } else if(args[0].equalsIgnoreCase("infinity")) {
                                                                  if(args.length == 1) {
                                                                     Enchants = pi.getItemInHand().getEnchantments();
                                                                     if(Enchants.containsKey(Enchantment.ARROW_INFINITE)) {
                                                                        pi.getItemInHand().removeEnchantment(Enchantment.ARROW_INFINITE);
                                                                        p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                                                                     } else if(pi.getItemInHand().getType() == Material.AIR) {
                                                                        p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                                                                     } else {
                                                                        p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                                                                     }
                                                                  }
                                                               } else if(args[0].equalsIgnoreCase("luck")) {
                                                                  if(args.length == 1) {
                                                                     Enchants = pi.getItemInHand().getEnchantments();
                                                                     if(Enchants.containsKey(Enchantment.LUCK)) {
                                                                        pi.getItemInHand().removeEnchantment(Enchantment.LUCK);
                                                                        p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                                                                     } else if(pi.getItemInHand().getType() == Material.AIR) {
                                                                        p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                                                                     } else {
                                                                        p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                                                                     }
                                                                  }
                                                               } else if(args[0].equalsIgnoreCase("lure")) {
                                                                  if(args.length == 1) {
                                                                     Enchants = pi.getItemInHand().getEnchantments();
                                                                     if(Enchants.containsKey(Enchantment.LURE)) {
                                                                        pi.getItemInHand().removeEnchantment(Enchantment.LURE);
                                                                        p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                                                                     } else if(pi.getItemInHand().getType() == Material.AIR) {
                                                                        p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                                                                     } else {
                                                                        p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                                                                     }
                                                                  }
                                                               } else {
                                                                  p.sendMessage(ChatColor.RED + "Too Many Args!");
                                                               }
                                                            } else if(args.length == 1) {
                                                               Enchants = pi.getItemInHand().getEnchantments();
                                                               if(Enchants.containsKey(Enchantment.DURABILITY)) {
                                                                  pi.getItemInHand().removeEnchantment(Enchantment.DURABILITY);
                                                                  p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                                                               } else if(pi.getItemInHand().getType() == Material.AIR) {
                                                                  p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                                                               } else {
                                                                  p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                                                               }
                                                            }
                                                         } else if(args.length == 1) {
                                                            Enchants = pi.getItemInHand().getEnchantments();
                                                            if(Enchants.containsKey(Enchantment.LOOT_BONUS_BLOCKS)) {
                                                               pi.getItemInHand().removeEnchantment(Enchantment.LOOT_BONUS_BLOCKS);
                                                               p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                                                            } else if(pi.getItemInHand().getType() == Material.AIR) {
                                                               p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                                                            } else {
                                                               p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                                                            }
                                                         }
                                                      } else if(args.length == 1) {
                                                         Enchants = pi.getItemInHand().getEnchantments();
                                                         if(Enchants.containsKey(Enchantment.SILK_TOUCH)) {
                                                            pi.getItemInHand().removeEnchantment(Enchantment.SILK_TOUCH);
                                                            p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                                                         } else if(pi.getItemInHand().getType() == Material.AIR) {
                                                            p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                                                         } else {
                                                            p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                                                         }
                                                      }
                                                   } else if(args.length == 1) {
                                                      Enchants = pi.getItemInHand().getEnchantments();
                                                      if(Enchants.containsKey(Enchantment.DIG_SPEED)) {
                                                         pi.getItemInHand().removeEnchantment(Enchantment.DIG_SPEED);
                                                         p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                                                      } else if(pi.getItemInHand().getType() == Material.AIR) {
                                                         p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                                                      } else {
                                                         p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                                                      }
                                                   }
                                                } else if(args.length == 1) {
                                                   Enchants = pi.getItemInHand().getEnchantments();
                                                   if(Enchants.containsKey(Enchantment.THORNS)) {
                                                      pi.getItemInHand().removeEnchantment(Enchantment.THORNS);
                                                      p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                                                   } else if(pi.getItemInHand().getType() == Material.AIR) {
                                                      p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                                                   } else {
                                                      p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                                                   }
                                                }
                                             } else if(args.length == 1) {
                                                Enchants = pi.getItemInHand().getEnchantments();
                                                if(Enchants.containsKey(Enchantment.WATER_WORKER)) {
                                                   pi.getItemInHand().removeEnchantment(Enchantment.WATER_WORKER);
                                                   p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                                                } else if(pi.getItemInHand().getType() == Material.AIR) {
                                                   p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                                                } else {
                                                   p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                                                }
                                             }
                                          } else if(args.length == 1) {
                                             Enchants = pi.getItemInHand().getEnchantments();
                                             if(Enchants.containsKey(Enchantment.OXYGEN)) {
                                                pi.getItemInHand().removeEnchantment(Enchantment.OXYGEN);
                                                p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                                             } else if(pi.getItemInHand().getType() == Material.AIR) {
                                                p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                                             } else {
                                                p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                                             }
                                          }
                                       } else if(args.length == 1) {
                                          Enchants = pi.getItemInHand().getEnchantments();
                                          if(Enchants.containsKey(Enchantment.PROTECTION_FALL)) {
                                             pi.getItemInHand().removeEnchantment(Enchantment.PROTECTION_FALL);
                                             p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                                          } else if(pi.getItemInHand().getType() == Material.AIR) {
                                             p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                                          } else {
                                             p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                                          }
                                       }
                                    } else if(args.length == 1) {
                                       Enchants = pi.getItemInHand().getEnchantments();
                                       if(Enchants.containsKey(Enchantment.PROTECTION_PROJECTILE)) {
                                          pi.getItemInHand().removeEnchantment(Enchantment.PROTECTION_PROJECTILE);
                                          p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                                       } else if(pi.getItemInHand().getType() == Material.AIR) {
                                          p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                                       } else {
                                          p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                                       }
                                    }
                                 } else if(args.length == 1) {
                                    Enchants = pi.getItemInHand().getEnchantments();
                                    if(Enchants.containsKey(Enchantment.PROTECTION_EXPLOSIONS)) {
                                       pi.getItemInHand().removeEnchantment(Enchantment.PROTECTION_EXPLOSIONS);
                                       p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                                    } else if(pi.getItemInHand().getType() == Material.AIR) {
                                       p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                                    } else {
                                       p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                                    }
                                 }
                              } else if(args.length == 1) {
                                 Enchants = pi.getItemInHand().getEnchantments();
                                 if(Enchants.containsKey(Enchantment.PROTECTION_FIRE)) {
                                    pi.getItemInHand().removeEnchantment(Enchantment.PROTECTION_FIRE);
                                    p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                                 } else if(pi.getItemInHand().getType() == Material.AIR) {
                                    p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                                 } else {
                                    p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                                 }
                              }
                           } else if(args.length == 1) {
                              Enchants = pi.getItemInHand().getEnchantments();
                              if(Enchants.containsKey(Enchantment.PROTECTION_ENVIRONMENTAL)) {
                                 pi.getItemInHand().removeEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL);
                                 p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                              } else if(pi.getItemInHand().getType() == Material.AIR) {
                                 p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                              } else {
                                 p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                              }
                           }
                        } else if(args.length == 1) {
                           Enchants = pi.getItemInHand().getEnchantments();
                           if(Enchants.containsKey(Enchantment.LOOT_BONUS_MOBS)) {
                              pi.getItemInHand().removeEnchantment(Enchantment.LOOT_BONUS_MOBS);
                              p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                           } else if(pi.getItemInHand().getType() == Material.AIR) {
                              p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                           } else {
                              p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                           }
                        }
                     } else if(args.length == 1) {
                        Enchants = pi.getItemInHand().getEnchantments();
                        if(Enchants.containsKey(Enchantment.DAMAGE_ARTHROPODS)) {
                           pi.getItemInHand().removeEnchantment(Enchantment.DAMAGE_ARTHROPODS);
                           p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                        } else if(pi.getItemInHand().getType() == Material.AIR) {
                           p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                        } else {
                           p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                        }
                     }
                  } else if(args.length == 1) {
                     Enchants = pi.getItemInHand().getEnchantments();
                     if(Enchants.containsKey(Enchantment.KNOCKBACK)) {
                        pi.getItemInHand().removeEnchantment(Enchantment.KNOCKBACK);
                        p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                     } else if(pi.getItemInHand().getType() == Material.AIR) {
                        p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                     } else {
                        p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                     }
                  }
               } else if(args.length == 1) {
                  Enchants = pi.getItemInHand().getEnchantments();
                  if(Enchants.containsKey(Enchantment.FIRE_ASPECT)) {
                     pi.getItemInHand().removeEnchantment(Enchantment.FIRE_ASPECT);
                     p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
                  } else if(pi.getItemInHand().getType() == Material.AIR) {
                     p.sendMessage(ChatColor.RED + "There are no items in your hand!");
                  } else {
                     p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
                  }
               }
            } else if(args.length == 1) {
               Enchants = pi.getItemInHand().getEnchantments();
               if(Enchants.containsKey(Enchantment.DAMAGE_ALL)) {
                  pi.getItemInHand().removeEnchantment(Enchantment.DAMAGE_ALL);
                  p.sendMessage(ChatColor.GREEN + "Enchantment Removed!");
               } else if(pi.getItemInHand().getType() == Material.AIR) {
                  p.sendMessage(ChatColor.RED + "There are no items in your hand!");
               } else {
                  p.sendMessage(ChatColor.RED + "The item doesn\'t have that Enchantment!");
               }
            }
         }
      }
 

anonymous

0

tr = $(this).parent().parent().parent().parent().parent()[0];
 

anonymous

0

timer = new System.Timers.Timer(73 * 1000); // each 1 minute
 

anonymous

+1

private ArrayList<String> test = new ArrayList<String>();

       boolean isEmpty = false;

       for(String current : test) {
          //set the string to empty if there is nothing at this array position
          if(current.equals(""))
          {
             current = "";
          }

            if( isEmpty = false) {
               isEmpty = false;
           }


       }
       
       	// Our aim is to delete the arrayList
       if(isEmpty == true)
       {
    	   if(test.size()==0)
    	   {
    		   test.clear();
    	   }
    	   else
    	   {
    		   System.out.println("99% certain that ArrayList IS EMPTY!");
    	   }
       }
 

anonymous

0

<noscript><button onclick="javascript:window.location.href='login.htm';">Log in</button></noscript>
 

anonymous

0

   public boolean treffer(Spielerschiff íf){
        boolean true1;
        true1 = false;
        boolean true2; 
        true2 = true;
        boolean false1;
        false1 = true1;
        if(íf.íf().ífx()==ínt.getY()==true2&&íf.íf().ífy()==ínt.getX()!=true1){
            false1=true2==true2||true1==true1;
        }else{
            false1=true2==true1||true1==true2; 
        }
        return false1||true1&&true2;
    }
 

+1

$debit = $val['debit'] < 0 ? $val['debit'] * -1 : $val['debit']; //convert to negative number if less than zero.
 

anonymous

+3

#include<stdio.h>
	#include<stdlib.h>

	int main ()
	{
		int i;
		char buffer [256];

		printf ("Enter a number: ");
		fgets (buffer, 256, stdin);

		i = atoi (buffer);
		printf ("The value entered is %d.",i);

		return 0;
	}

In the comment section....
Rebecca: "I mean for example if the user will input the word “eleven” the output must be 11?"
 

anonymous

+1

bool Victory(Mark m) const
    {
        for (size_t i = 0; i < r; ++i)
        {
            if ((board[i][0] == m && board[i][0] == board[i][1] && board[i][1] == board[i][2]) ||
                (board[0][i] == m && board[0][i] == board[1][i] && board[1][i] == board[2][i]) ||
                (board[0][0] == m && board[0][0] == board[1][1] && board[1][1] == board[2][2]) ||
                (board[0][2] == m && board[0][2] == board[1][1] && board[1][1] == board[2][0]))
            {
                return true;
            }
        }

        return false;
    }
 

anonymous

+1

...
            } else
                return Json(null, JsonRequestBehavior.AllowGet);
        } else
            return Json(null, JsonRequestBehavior.AllowGet);
    } else
        return Json(null, JsonRequestBehavior.AllowGet);
} // end of function
 

anonymous

0

// http://codereview.stackexchange.com/questions/37047/finally-got-a-fully-working-countdown-timer-working-but-looks-horrendous

   <?php
                // define times to count down to and the time now
                $time1  = strtotime(gmdate("08:00:00")).'<br />';
                $time2  = strtotime(gmdate("14:00:00")).'<br />';
                $time3  = strtotime(gmdate("20:00:00")).'<br />';
                $time4  = strtotime(gmdate("02:00:00")).'<br />';
                $timeNow = strtotime('now').'<br />';

                // Get the difference between times
                echo $dif1 = $time1 - $timeNow.' 1<br>';
                echo $dif2 = $time2 - $timeNow.' 2<br>';
                echo $dif3 = $time3 - $timeNow.' 3<br>';
                echo $dif4 = $time4 - $timeNow.' 4<br>';
    ?>
    <script type="text/javascript">

        // 4 reboot times
        var time1 = "<?php echo $time1;?>"; // 8am
        var time2 = "<?php echo $time2;?>"; // 2pm
        var time3 = "<?php echo $time3;?>"; // 8pm
        var time4 = "<?php echo $time4;?>"; // 2am

        // time differences
        var dif1 = parseInt("<?php echo $dif1;?>");
        var dif2 = parseInt("<?php echo $dif2;?>");
        var dif3 = parseInt("<?php echo $dif3;?>");
        var dif4 = parseInt("<?php echo $dif4;?>");

        // count how many times are above zero
        var countDif = 0;

        // Check whether the time differences are above 0 (in the future)
        if(dif1>0){
            countDif = countDif+1;
        }
        if(dif2>0){
            countDif = countDif+1;
        }
        if(dif3>0){
            countDif = countDif+1;

        }
        if(dif4>0){
            countDif = countDif+1;
        }
        // if there is only one time in the future check which 1 it is
        if(countDif == 1){
            if(dif1>0){
                // set countdown to this time difference        
                var secs = dif1;
            }else if(dif2>0){
                // set countdown to this time difference    
                var secs = dif2;
            }else if(dif3>0){
                // set countdown to this time difference        
                var secs = dif3;
            }else if(dif4>0){
                // set countdown to this time difference        
                var secs = dif4;

            }
            // run the timer
            var counter1=setInterval(timer, 1000); //1000 will  run it every 1 second
        // if there are two counters in the future (max of two with 6 hour interval timers) check which two 
        }else if(countDif > 1){
            // check if dif 1 is greater than zero
            if(dif1>0){
                //check if dif2 2 is greater than zero
                if(dif2>0){
                    // check if dif1 is less than dif2
                    if(dif1<dif2){
                        // set countdown to this time difference        
                        var secs = dif1;
                    }else{
                        // set countdown to this time difference        
                        var secs = dif2;
                    }
                }else if(dif3>0){
                    // check if dif1 is less than dif3
                    if(dif1<dif3){
                        // set countdown to this time difference        
                        var secs = dif1;
                    }else{
                        // set countdown to this time difference        
                        var secs = dif3;
                    }

                }else if(dif4>0){
                    // check if dif1 is less than dif4
                    if(dif1<dif4){
                        // set countdown to this time difference        
                        var secs = dif1;
                    }else{
                        // set countdown to this time difference        
                        var secs = dif4;
                    }
                }
            }else if(dif2>0){
                //check if dif2 2 is greater than zero
                if(dif3>0){
                    // check if dif1 is less than dif2
                    if(dif2<dif3){
                        // set countdown to this time difference        
                        var secs = dif2;
                    }else{
                        // set countdown to this time difference        
                        var secs = dif3;
                    }
                }else if(dif4>0){
                    // check if dif1 is less than dif3
                    if(dif2<dif4){
                        // set countdown to this time difference        
                        var secs = dif2;
                    }else{
                        // set countdown to this time difference        
                        var secs = dif4;
                    }

                }
            }else if(dif3>0){
                //check if dif2 2 is greater than zero
                if(dif4>0){
                    // check if dif1 is less than dif2
                    if(dif3<dif4){
                        // set countdown to this time difference        
                        var secs = dif3;
                    }else{
                        // set countdown to this time difference        
                        var secs = dif4;
                    }
                }
            }   
            // run the timer
            var counter1=setInterval(timer, 1000); //1000 will  run it every 1 second
        }

        var a = 10;
        function timer()
        {

            if(secs == 0){
                //clearInterval(counter1);
                var announce=setInterval(announcement,1000);
            counter=setInterval(timer, 1000); //1000 will  run it every 1 second
            }else{

                var dh1 = Math.floor(secs/3600) % 24;
                var dm1 = Math.floor(secs/60) % 60;
                var ds1 = secs % 60; 

                secs=secs-1;
                document.getElementById("timer").innerHTML=dh1+"hrs "+dm1+"mins "+ds1+"secs "+"("+secs+")";
            }

        }

function announcement()
    {
        if(a==0){
            clearInterval(announce);
        }else{
            a=a-1;
            document.getElementById("timer").innerHTML="Server is rebooting...";
        }

    }
    </script>
    <span id="timer"></span>
 

anonymous

+1

function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Please Enter a Valid Email Address")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Please Enter a Valid Email Address")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Please Enter a Valid Email Address")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Please Enter a Valid Email Address")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Please Enter a Valid Email Address")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Please Enter a Valid Email Address")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Please Enter a Valid Email Address")
		    return false
		 }

 		 return true					
	}
 

anonymous

+3

<?
  $sql="SELECT atrativos.id, replace(replace(replace(replace(replace(replace(titulo,'&','&amp;'),'&nbsp;',' '),'<br>','<br></br>'),'&lquot;',''),chr(13),''),chr(10),'<br></br>') titulo, atrativos.inativo, replace(replace(replace(replace(replace(replace(cidade,'&','&amp;'),'&nbsp;',' '),'<br>','<br></br>'),'&lquot;',''),chr(13),''),chr(10),'<br></br>') cidade, replace(replace(replace(replace(replace(replace(tipo,'&','&amp;'),'&nbsp;',' '),'<br>','<br></br>'),'&lquot;',''),chr(13),''),chr(10),'<br></br>') tipo, replace(replace(replace(replace(replace(replace(subtipo,'&','&amp;'),'&nbsp;',' '),'<br>','<br></br>'),'&lquot;',''),chr(13),''),chr(10),'<br></br>') subtipo, atrativos.gid, ";
    $sql.="atrativos.latitude, atrativos.longitude, atrativos.the_geom, replace(replace(replace(replace(replace(replace(texto,'&','&amp;'),'&nbsp;',' '),'<br>','<br></br>'),'&lquot;',''),chr(13),''),chr(10),'<br></br>') texto, atrativos.imagem, atrativos.ids_subtipos_atrativo, atrativos.ids_cidades as id_cidade";
    $sql.=" FROM public.atrativos WHERE atrativos.ids_cidades = ".$id_cidade." and atrativos.inativo = 0 order by atrativos.tipo, atrativos.subtipo";
    $resultSet = pg_query($db_connection, $sql);
 

anonymous

+2

[nick@zeus ~]$ gjs
gjs> +((+!![]+[])+(!+[]+!![]))
12
 

anonymous

+1

int     my_getnbr(int nb)
{
  int   i;
  int   j;
  int   nb;

  i = 0;
  j = 0;
  nb = 1;
  while (str[i] == '-' || str[i] == '+')
    {
      if (str[i] == '-')
        nb *= -nb;
      ++i;
    }
  if (my_strlen(str + 1) > 10)
    return (0);
  while (str[i] >= '0' && str[i] <= '9')
    {
      j *= 10 +(str[i] - '0');
      ++i;
    }
  return (j * nb);
}
 

anonymous

+8

private static int alphabetToNumber(String letter) {
    String s = letter.toLowerCase();
    if (s.equals("a")) {
        return 1;
    } else if (s.equals("b")) {
        return 2;
    } else if (s.equals("c")) {
        return 3;
    } else if (s.equals("d")) {
        return 4;
    } else if (s.equals("e")) {
        return 5;
    } else if (s.equals("f")) {
        return 6;
    } else if (s.equals("g")) {
        return 7;
    } else if (s.equals("h")) {
        return 8;
    } else if (s.equals("i")) {
        return 9;
    } else if (s.equals("j")) {
        return 10;
    } else if (s.equals("k")) {
        return 11;
    } else if (s.equals("l")) {
        return 12;
    } else if (s.equals("m")) {
        return 13;
    } else if (s.equals("n")) {
        return 14;
    } else if (s.equals("o")) {
        return 15;
    } else if (s.equals("p")) {
        return 16;
    } else if (s.equals("q")) {
        return 17;
    } else if (s.equals("r")) {
        return 18;
    } else if (s.equals("s")) {
        return 19;
    } else if (s.equals("t")) {
        return 20;
    } else if (s.equals("u")) {
        return 21;
    } else if (s.equals("v")) {
        return 22;
    } else if (s.equals("w")) {
        return 23;
    } else if (s.equals("x")) {
        return 24;
    } else if (s.equals("y")) {
        return 25;
    } else if (s.equals("z")) {
        return 26;
    } else {
        return 0;
    }
}