$i = 0;
if ($i == 'dupa') {
echo 'dupa';
} else {
echo 'nie dupa';
}
Do you think, that output is "nie dupa"? Just try...
return IsActive == true ? true : false;
<?php
/**
* SetSelectedPlanet.php
*
* @version 1
* @copyright 2008 By Chlorel for XNova
*/
function SetSelectedPlanet ( &$CurrentUser ) {
global $_GET;
string str = Console.ReadLine();
string len = 0;
for(int i = 0; i < str.Length; i++)
{
len++;
}
Let's get string length :| Dummy
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;
}
}
try:
self._update_plan()
except Exception as e:
raise Exception('{0}'.format(e))
RIP debuggability
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.
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"
};
...
if (alignEntrySize & 1)
alignEntrySize++;
if (alignEntrySize & 2)
alignEntrySize += 2;
...
<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>
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
17 * * * * root [[ $(ping -c1 8.8.8.8 | tail -n2 | head -n1 | cut -d"," -f2 | cut -d" " -f2) != "1" ]] && { { /etc/init.d/networking restart && /etc/init.d/network-manager restart && curl "https://api.telegram.org/XXX:XXX/sendMessage?chat_id=XXX&text=\%22networking\%20and\%20network-manager\%20restarted\%22" ;} && { wget -O /dev/null -o /dev/null https://nyifiles.pfsense.org/mirror/downloads/pfSense-CE-2.3.5-RELEASE-2g-i386-nanobsd.img.gz && curl "https://api.telegram.org/XXX:XXX/sendMessage?chat_id=XXX&text=\%22wget\%20download\%20OK\%22" || curl "https://api.telegram.org/XXX:XXX/sendMessage?chat_id=XXX&text=\%22wget\%20download\%20KO\%22" ;} ;}
With me! Sing! It's gonna ping! If not it's gonna restart the net! If yes is gonna send you a text! And then is gonna download a file, just to check!
//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..
function returnTrue() {
return true;
}