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 ++;
}
}
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
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.
$i = 0;
if ($i == 'dupa') {
echo 'dupa';
} else {
echo 'nie dupa';
}
Do you think, that output is "nie dupa"? Just try...
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;
}
}
...
if (alignEntrySize & 1)
alignEntrySize++;
if (alignEntrySize & 2)
alignEntrySize += 2;
...
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);
int my_array[] = {
#include "data.txt"
};
try:
self._update_plan()
except Exception as e:
raise Exception('{0}'.format(e))
RIP debuggability
<div id="header">
<ul>
<li id="current"><a href="index.php">Strona Główna</a></li>
<li id="current"><a href="index.php?cmd=1">Aktualności</a></li>
<li id="current"><a href="index.php?cmd=2">Strony Serwisu</a></li>
<li id="current"><a href="index.php?cmd=10">Artykuly</a></li>
<li id="current"><a href="index.php?cmd=3">Linki</a></li>
<li id="current"><a href="index.php?cmd=4">Księga Gości</a></li>
<li id="current"><a href="index.php?cmd=5">Newsletter</a></li>
<li id="current"><a href="index.php?cmd=6">Użytkownicy</a></li>
<li id="current"><a href="index.php?cmd=8">Menu</a></li>
<li id="current"><a href="index.php?cmd=12">Bannery</a></li>
<li id="current"><a href="index.php?cmd=11">Pliki</a></li>
<li id="current"><a href="index.php?cmd=7">Forum</a></li>
<li id="current"><a href="index.php?cmd=13">Ban</a></li>
<li id="current"><a href="index.php?cmd=9">Konfiguracja</a></li>
</ul></div>
function returnTrue() {
return true;
}
//this is a commit!!
trans.Commit();
It doesn't look like it was there because of some changes - someone simply wanted to be double sure he will see the commit there, I guess..
public function update($oldVersion) {
switch ($oldVersion) {
case '1.0.0':
case '1.0.1':
break;
default:
return false;
}
return true;
}
Found in a Shopware Plugin