/** * 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)
      

anonymous

+4

// you really did it by hand?
public static String buildUrlEncode(String cityName) {
	if(cityName != null) {
		String encodedString = (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((cityName.replace('.', '-'))
				  .replace('ù', 'u')).replace('ú', 'u')).replace('û', 'u')).replace('ü', 'u')).replace('ý', 'y')).replace('ë', 'e')).replace('à', 'a'))
				  .replace('á', 'a')).replace('â', 'a')).replace('ã', 'a')).replace('ä', 'a')).replace('å', 'a')).replace('æ', 'a')).replace('ç', 'c'))
				  .replace('è', 'e')).replace('é', 'e')).replace('ê', 'e')).replace('ë', 'e')).replace('ì', 'i')).replace('í', 'i')).replace('î', 'i'))
				  .replace('ï', 'i')).replace('ð', 'o')).replace('ñ', 'n')).replace('ò', 'o')).replace('ó', 'o')).replace('ô', 'o')).replace('õ', 'o'))
				  .replace('ö', 'o')).replace('ø', 'o')).replace(' ', '-')).replace('/', '-')).replace('\'', '-')).replace(":", "")).replace("~", ""))
				  .replace("!", "")).replace("@", "")).replace("#", "")).replace("$", "")).replace("%", "")).replace("*", "")).replace("(", ""))
				  .replace(")", "")).replace("_", "")).replace("+", "")).replace("{", "")).replace("}", "")).replace("[", "")).replace("]", ""))
				  .replace(";", "")).replace("'", "")).replace(":", "")).replace("\"", "")).replace("<", "")).replace(">", "")).replace("?", ""))
				  .replace(",-", "-")).replace("----", "-")).replace("---", "-")).replace("--", "-"));
		return encodedString;
	}
	return "";
}
 

anonymous

-3

// XXX: This class sucks.
 

anonymous

+4

	/**
	 * Default true value
	 */
	public static final String DEFAULT_TRUE_VALUE = "false";
 

+1

echo "<select>";
for($i=1;$i<=12;$i++){
  echo("<option value=".$i.">");
  switch($i){
    case 1: echo("January");break;
    case 2: echo("February");break;
    case 3: echo("March");break;
    case 4: echo("April");break;
    case 5: echo("May");break;
    case 6: echo("June");break;
    case 7: echo("July");break;
    case 8: echo("August");break;
    case 9: echo("September");break;
    case 10: echo("October");break;
    case 11: echo("November");break;
    case 12: echo("December");break;
  }
}
echo "</select>";
 

anonymous

+1

$authToken = sha1(md5(time()) ^ md5(rand(rand(), rand()));
 

anonymous

+5

function abs(i){
    return (i + "").replace("-", "");
}
 

anonymous

+5

UPDATE tableUsers SET name = ‘John’;

 

anonymous

0

public static final String DOT_DELIMITER_REGEX = "\\.";
// ...
final String[] splitted = path.split(DOT_DELIMITER_REGEX);
return path.replaceFirst(splitted[0] + ".", "");
 

anonymous

+5

            } catch (Exception ex)
            {
                String error = ex.toString();
                if (error.contains("java.net.UnknownHostException"))
                {
                    foxbot.sendNotice(sender, String.format("%s is an unknown address!", args[0]));
                    return;
                }
                if (error.contains("java.lang.NumberFormatException"))
                {
                    foxbot.sendNotice(sender, String.format("%s isn't a number!", args[1]));
                    return;
                }
                if (error.contains("java.lang.IllegalArgumentException"))
                {
                    foxbot.sendNotice(sender, String.format("%s is too high a number for a port!", args[1]));
                    return;
                }
                foxbot.sendNotice(sender, foxbot.getUtils().colourise(String.format("&c%s", error)));
            }
            return;
 

anonymous

0

// Found something like this in some legacy project, 
// there were 20+ usages of this method
// Looks like some kind of unboxing :)

public boolean nullConverter(Boolean parameter) {
    return parameter == Boolean.TRUE;
}