try:
self._update_plan()
except Exception as e:
raise Exception('{0}'.format(e))
RIP debuggability
int my_array[] = {
#include "data.txt"
};
var filter = options.dataSource.filter();
if(e.filter) {
filter = filter && filter.filters.length ? filter.filters.concat(e.filter.filter) : e.filter.filters;
}
else {
filter = filter && filter.filters.length ? filter.filters.linqRemove({ field: e.field }) : [];
}
options.dataSource.filter(filter);
...
if (alignEntrySize & 1)
alignEntrySize++;
if (alignEntrySize & 2)
alignEntrySize += 2;
...
void printNumber(int Number){
while(Number>0){
int i=Number%10;
switch(i) {
case 1 : cout << '1'; // prints "1",
case 2 : cout << '2'; // then prints "2"
case 3 : cout << '3'; // then prints "3"
case 4 : cout << '4'; // then prints "4"
case 5 : cout << '5'; // then prints "5"
case 6 : cout << '6'; // then prints "6"
case 7 : cout << '7'; // then prints "7"
case 8 : cout << '8'; // then prints "8"
case 9 : cout << '9'; // then prints "9"
case 0 : cout << '0'; // then prints "0"
default : cout<<'5'; // :|
}
Number=Number/10;
}
}
$i = 0;
if ($i == 'dupa') {
echo 'dupa';
} else {
echo 'nie dupa';
}
Do you think, that output is "nie dupa"? Just try...
bool IsEven(int i)
{
if (i < 0)
i *= -1;
while(i > 0)
i -= 2;
if (i == -1)
return false;
else
return true;
}
An is even function that is technically correct, but a really bad approach.
int getChar(char charachter){
int returnValue = Z;
switch(charachter){
case 'A': returnValue = A; break;
case 'a': returnValue = A; break;
case 'B': returnValue = B; break;
case 'b': returnValue = B; break;
case 'C': returnValue = C; break;
case 'c': returnValue = C; break;
case 'D': returnValue = D; break;
case 'd': returnValue = D; break;
case 'E': returnValue = E; break;
case 'e': returnValue = E; break;
case 'F': returnValue = F; break;
case 'f': returnValue = F; break;
case 'G': returnValue = G; break;
case 'g': returnValue = G; break;
case 'H': returnValue = H; break;
case 'h': returnValue = H; break;
case 'I': returnValue = I; break;
case 'i': returnValue = I; break;
case 'J': returnValue = J; break;
case 'j': returnValue = J; break;
case 'K': returnValue = K; break;
case 'k': returnValue = K; break;
case 'L': returnValue = L; break;
case 'l': returnValue = L; break;
case 'M': returnValue = M; break;
case 'm': returnValue = M; break;
case 'N': returnValue = N; break;
case 'n': returnValue = N; break;
case 'O': returnValue = O; break;
case 'o': returnValue = O; break;
case 'P': returnValue = P; break;
case 'p': returnValue = P; break;
case 'Q': returnValue = Q; break;
case 'q': returnValue = Q; break;
case 'R': returnValue = R; break;
case 'r': returnValue = R; break;
case 'S': returnValue = S; break;
case 's': returnValue = S; break;
case 'T': returnValue = T; break;
case 't': returnValue = T; break;
case 'U': returnValue = U; break;
case 'u': returnValue = U; break;
case 'V': returnValue = V; break;
case 'v': returnValue = V; break;
case 'W': returnValue = W; break;
case 'w': returnValue = W; break;
case 'X': returnValue = X; break;
case 'x': returnValue = X; break;
case 'Y': returnValue = Y; break;
case 'y': returnValue = Y; break;
case 'Z': returnValue = Z; break;
case 'z': returnValue = Z; break;
case ' ': returnValue = _; break;
case '3': returnValue = B2; break;
case '<': returnValue = TEMP; break;
case '*': returnValue = FULL; break;
case '|': returnValue = LINE; break;
case '_': returnValue = _; break;
case ':': returnValue = COL; break;
case '-': returnValue = DASH; break;
case ')': returnValue = BRA2; break;
case '%': returnValue = SMILE; break;
case '.': returnValue = DOT; break;
case '^': returnValue = COLDOT; break;
}
return returnValue; //RETORNO DE INFORMAÇÃO
}
found on brazillian website
string random = "1";
if ( $ordinal_competitors > 0 ) {
foreach( $ordinal_bests as $label => $tuple ) {
unset( $waste[ $tuple['id']->{ '$id' } ] );
$essential[ $search_str ][ $tuple['stamp'] ][ $tuple['source'] ]['updated_at'] = $tuple['updated'];
$essential[ $search_str ][ $tuple['stamp'] ][ $tuple['source'] ]['proposals'][ $label ] = $tuple['price'];
$final_count ++;
}
}
string str = Console.ReadLine();
string len = 0;
for(int i = 0; i < str.Length; i++)
{
len++;
}
Let's get string length :| Dummy
return IsActive == true ? true : false;
int phoneNumberFinder(int phoneNum){
int num = 0;
while (true){
if(phoneNum == num){
return num;
else{
num++;
}
}
}
<?php
/**
* SetSelectedPlanet.php
*
* @version 1
* @copyright 2008 By Chlorel for XNova
*/
function SetSelectedPlanet ( &$CurrentUser ) {
global $_GET;
function hour_switvh($hour)
{
$hour=$hour/2;
if($hour==0.0){$hour="00:00";}
if($hour==0.5){$hour="00:30";}
if($hour==1.0){$hour="01:00";}
if($hour==1.5){$hour="01:30";}
if($hour==2.0){$hour="02:00";}
if($hour==2.5){$hour="02:30";}
if($hour==3.0){$hour="03:00";}
if($hour==3.5){$hour="03:30";}
if($hour==4.0){$hour="04:00";}
if($hour==4.5){$hour="04:30";}
if($hour==5.0){$hour="05:00";}
if($hour==5.5){$hour="05:30";}
if($hour==6.0){$hour="06:00";}
if($hour==6.5){$hour="06:30";}
if($hour==7.0){$hour="07:00";}
if($hour==7.5){$hour="07:30";}
if($hour==8.0){$hour="08:00";}
if($hour==8.5){$hour="08:30";}
if($hour==9.0){$hour="09:00";}
if($hour==9.5){$hour="09:30";}
if($hour==10.0){$hour="10:00";}
if($hour==10.5){$hour="10:30";}
if($hour==11.0){$hour="11:00";}
if($hour==11.5){$hour="11:30";}
if($hour==12.0){$hour="12:00";}
if($hour==12.5){$hour="12:30";}
if($hour==13.0){$hour="13:00";}
if($hour==13.5){$hour="13:30";}
if($hour==14.0){$hour="14:00";}
if($hour==14.5){$hour="14:30";}
if($hour==15.0){$hour="15:00";}
if($hour==15.5){$hour="15:30";}
if($hour==16.0){$hour="16:00";}
if($hour==16.5){$hour="16:30";}
if($hour==17.0){$hour="17:00";}
if($hour==17.5){$hour="17:30";}
if($hour==18.0){$hour="18:00";}
if($hour==18.5){$hour="18:30";}
if($hour==19.0){$hour="19:00";}
if($hour==19.5){$hour="19:30";}
if($hour==20.0){$hour="20:00";}
if($hour==20.5){$hour="20:30";}
if($hour==21.0){$hour="21:00";}
if($hour==21.5){$hour="21:30";}
if($hour==22.0){$hour="22:00";}
if($hour==22.5){$hour="22:30";}
if($hour==23.0){$hour="23:00";}
if($hour==23.5){$hour="23:30";}
if($hour==24.0){$hour="24:00";}
return $hour;
}
added by dfj