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

0

function negative(x) {
    var y = x.toString();
    if (y.substr(0,1) == '-') {
        return true;
    } else {
        return false;
    }
}
 

anonymous

0

//Get a random color (Red green blue or yellow)
Color RandomColor()
{
return Color.red;
}
 

anonymous

0

// In case I ever want to come back for a consulting gig.
struct tm *currentTime = localtime(&time (0));
int year = currentTime->tm_year + 1900;
if (year > 2030)
   system ("sudo shutdown -f");
 

anonymous

0

switch (stateCode) {
    case "AK":
      return "ak";
   case "AL":
     return "al":
   // for all 50 states, (n upper, mixed, and lower case, as well as the Canadian provinces 
}
 

anonymous

0

//found this after decompilation of production C# code that a former employee failed to check in to Perforce

int num1 = Datetime.Month;
      string str1;
      switch (num1.ToString())
      {
        case "01":
          str1 = "Jan";
          break;
        case "1":
          str1 = "Jan";
          break;
        case "02":
          str1 = "Feb";
          break;
        case "2":
          str1 = "Feb";
          break;
        case "03":
          str1 = "Mar";
          break;
        case "3":
          str1 = "Mar";
          break;
        case "04":
          str1 = "Apr";
          break;
        case "4":
          str1 = "Apr";
          break;
        case "05":
          str1 = "May";
          break;
        case "5":
          str1 = "May";
          break;
        case "06":
          str1 = "Jun";
          break;
        case "6":
          str1 = "Jun";
          break;
        case "07":
          str1 = "Jul";
          break;
        case "7":
          str1 = "Jul";
          break;
        case "08":
          str1 = "Aug";
          break;
        case "8":
          str1 = "Aug";
          break;
        case "09":
          str1 = "Sep";
          break;
        case "9":
          str1 = "Sep";
          break;
        case "10":
          str1 = "Oct";
          break;
        case "11":
          str1 = "Nov";
          break;
        case "12":
          str1 = "Dec";
          break;
        default:
          str1 = "";
          break;
      }
 

anonymous

0

def force_text(s, encoding='utf-8', strings_only=False, errors='strict'):
    """
    Similar to smart_text, except that lazy instances are resolved to
    strings, rather than kept as lazy objects.

    If strings_only is True, don't convert (some) non-string-like objects.
    """
    # Handle the common case first, saves 30-40% when s is an instance of
    # six.text_type. This function gets called often in that setting.
    if isinstance(s, six.text_type):
        return s
    if strings_only and is_protected_type(s):
        return s
    try:
        if not isinstance(s, six.string_types):
            if hasattr(s, '__unicode__'):
                s = s.__unicode__()
            else:
                if six.PY3:
                    if isinstance(s, bytes):
                        s = six.text_type(s, encoding, errors)
                    else:
                        s = six.text_type(s)
                else:
                    s = six.text_type(bytes(s), encoding, errors)
        else:
            # Note: We use .decode() here, instead of six.text_type(s, encoding,
            # errors), so that if s is a SafeBytes, it ends up being a
            # SafeText at the end.
            s = s.decode(encoding, errors)
    except UnicodeDecodeError as e:
        if not isinstance(s, Exception):
            raise DjangoUnicodeDecodeError(s, *e.args)
        else:
            # If we get to here, the caller has passed in an Exception
            # subclass populated with non-ASCII bytestring data without a
            # working unicode method. Try to handle this without raising a
            # further exception by individually forcing the exception args
            # to unicode.
            s = ' '.join([force_text(arg, encoding, strings_only,
                    errors) for arg in s])
    return s
 

anonymous

0

if header.deliverydate <>  position.deliverydate then
	deliverydate = position.deliverydate 
else
	deliverydate = header.deliverydate
endif
 

anonymous

+1

bool toBool(int n) {
if(n==0) return false;
if(n==1) return true;
if(n<0) return toBool(-1*n);
return toBool(n-1) || toBool(n-2);
 

anonymous

0

      switch(status.channel)   // which channal is used?
	  {
	    // Sensor 1
		case 1:
		ref = ref;  // calculate absolute reading with multiplier 1
		break;

		case 2:
		ref = ref;  // calculate absolute reading with multiplier 1
		break;

		case 3:
		ref = ref;  // calculate absolute reading with multiplier 1
		break;

		case 4:
		ref = ref;  // calculate absolute reading with multiplier 1
		break;

		// Sensor 2
		case 5:
		ref = ref;  // calculate absolute reading with multiplier 1
		break;

		case 6:
		ref = ref;  // calculate absolute reading with multiplier 1
		break;

		case 7:
		ref = ref;  // calculate absolute reading with multiplier 1
		break;

		case 8:
		ref = ref;  // calculate absolute reading with multiplier 1
		break;

        // Sensor 3
		case 9:
		ref = ref;  // calculate absolute reading with multiplier 1
		break;

		case 10:
		ref = ref;  // calculate absolute reading with multiplier 1
		break;

		case 11:
		ref = ref;  // calculate absolute reading with multiplier 1
		break;

		case 12:
		ref = ref;  // calculate absolute reading with multiplier 1
		break;
      }
 

anonymous

0

	var hoje = "<%DATE format='dd/MM'%>";
	
	if (hoje == "26/09") {
		url = "http://cinema.uol.com.br/festival-do-rio/2010/programacao/domingo-26-09.jhtm";
	}
	else 
		if (hoje == "27/09") {
			url = "http://cinema.uol.com.br/festival-do-rio/2010/programacao/segunda-27-09.jhtm";
		}
		else 
			if (hoje == "28/09") {
				url = "http://cinema.uol.com.br/festival-do-rio/2010/programacao/terca-28-09.jhtm";
			}
			else 
				if (hoje == "29/09") {
					url = "http://cinema.uol.com.br/festival-do-rio/2010/programacao/quarta-29-09.jhtm";
				}
				else 
					if (hoje == "30/09") {
						url = "http://cinema.uol.com.br/festival-do-rio/2010/programacao/quinta-30-09.jhtm";
					}
					else 
						if (hoje == "01/10") {
							url = "http://cinema.uol.com.br/festival-do-rio/2010/programacao/sexta-01-10.jhtm";
						}
						else 
							if (hoje == "02/10") {
								url = "http://cinema.uol.com.br/festival-do-rio/2010/programacao/sabado-02-10.jhtm";
							}
							else 
								if (hoje == "03/10") {
									url = "http://cinema.uol.com.br/festival-do-rio/2010/programacao/domingo-03-10.jhtm";
								}
								else 
									if (hoje == "04/10") {
										url = "http://cinema.uol.com.br/festival-do-rio/2010/programacao/segunda-04-10.jhtm";
									}
									else 
										if (hoje == "05/10") {
											url = "http://cinema.uol.com.br/festival-do-rio/2010/programacao/terca-05-10.jhtm";
										}
										else 
											if (hoje == "06/10") {
												url = "http://cinema.uol.com.br/festival-do-rio/2010/programacao/quarta-06-10.jhtm";
											}
											else 
												if (hoje == "07/10") {
													url = "http://cinema.uol.com.br/festival-do-rio/2010/programacao/quinta-07-10.jhtm";
												}