- 1
<i style="background-image: url(.......);"/>
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+131
<i style="background-image: url(.......);"/>
Взято с facebook.com
Не знаю, какой глубинный смысл в выборе тега i для вставки картинки, который совершенно для этого не предназначен. Есть же div и span. Может это как-то нужно для отметания веб роботов, а может просто захотелось извратиться
+118
/**
* Функция создает новую таблицу.
* @param $name - имя новой таблицы. Имя должно быть проверено (например функцией mysql_real_escape_*)
* @return TRUE - если новая таблица была создана или FALSE - если нет
*/
function createTable($name) {
$retval = false;
if(!empty($name)){
$query = "CREATE TABLE IF NOT EXISTS `" . $name . "` (`Adres` varchar(150) DEFAULT NULL, `send` int(1) DEFAULT NULL )";
$result = mysql_query($query);
if($result){
$retval = true;
}
}
return $retval;
}
Вроде все хорошо и красиво. Но есть говнинка которая все портит
+150
<?php
function DaysDiff($d1,$d2){
$d2=1+strtotime($d2);
$d1=1+strtotime($d1);
return floor(($d2-$d1)/86400);
}
?>
а надо бы:
<?php
function DaysDiff($d1,$d2){
return bcdiv(strtotime($d2)-strtotime($d1),86400);
}
?>
+156
<?php
class Train {
private $strFrom;
private $strTo;
private $strName;
....................................
public function __construct($arrParameters) {
$objThis = $this;
$objThis->strFrom = $arrParameters['strFrom'];
$objThis->strTo = $arrParameters['strTo'];
$objThis->strName = $arrParameters['strName'];
................................
$intCount = count($arrParameters);
for ($intI = 0; $intI < $intCount; $intI++) {
............................
}
................................
foreach ($arrParameters as $strKey => $mixedValue) {
............................
}
}
....................................
}
Интересно ваше мнение о венгерской нотации
+132
<table width="500" height="10">
<td>
<br>
</tr>
</table>
Дипломная работа... no comments
+940.8
bool checkForExe(std::string ext)
{
return ext==".exe" ? true :
ext==".Exe" ? true :
ext==".eXe" ? true :
ext==".EXe" ? true :
ext==".exE" ? true :
ext==".ExE" ? true :
ext==".eXE" ? true :
ext==".EXE" ? true : false;
}
Нашел в одной моей очень древней программе-шутке. Регистронезависимая проверка на расширение .exe.
+1
package main
import "log"
func foo(x int) (int, error) {
return x + 1, nil
}
func main() {
x := 5
if x % 2 == 1 {
x, err := foo(x)
if err != nil {
log.Fatalf("Error")
}
log.Println(x)
}
log.Println(x)
}
Счастливой отладки, суки.
https://godbolt.org/z/6GWsq7W7q
0
import ballerina/auth;
import ballerina/config;
import ballerina/http;
import ballerina/log;
auth:InboundBasicAuthProvider basicAuthProvider = new;
http:BasicAuthHandler basicAuthHandler = new (basicAuthProvider);
listener http:Listener ep = new (9090, config = {
auth: {
authHandlers: [basicAuthHandler]
},
secureSocket: {
keyStore: {
path: config:getAsString("b7a.home") +
"/bre/security/ballerinaKeystore.p12",
password: "ballerina"
}
}
});
@http:ServiceConfig {
basePath: "/hello",
auth: {
scopes: ["scope1"]
}
}
service echo on ep {
@http:ResourceConfig {
methods: ["GET"],
path: "/sayHello",
auth: {
scopes: ["scope2"]
}
}
resource function hello(http:Caller caller, http:Request req) {
error? result = caller->respond("Hello, World!!!");
if (result is error) {
log:printError("Error in responding to caller", result);
}
}
}
Кто что думает про https://ballerina.io?
+1
setTimeout(function(){
document.getElementById('message').innerHTML = 'Это окно браузера закончило свою работу и может быть закрыто.' +
'<br>' +
'<button onclick="window.close()">Закрыть окно</button>';
},3000);
function objectValues(obj) {
var res = [];
for (var i = 0; i < obj.length; i++) {
if (obj.hasOwnProperty(i)) {
res.push(obj[i]);
}
}
return res;
}
sendMessage = function () {
var args = objectValues(arguments),
func = args.splice(1,1);
if (typeof window.postMessage !== 'undefined') {
window.opener.postMessage({
mine: 'uLogin',
func: func,
args: args
}, '*');
} else {
sendMessage = function () {
window.opener[func].apply(null, args);
};
}
};
if(/fill.php/.test("'ffdfdssdffsdfewfewfewfwf','redirect','https://dfssfd/login.php'")) {
try{
if(typeof window.opener.fill !== 'undefined') {
window.opener.fill('869becd1b998ec0add011915c7f4022e','redirect','https://asdasd/login.php');
} else {
sendMessage('869becd1b998ec0add011915c7f4022e','redirect','https://biglike.org/login.php');
}
} catch(e){
sendMessage('869becd1b998ec0add011915c7f4022e','redirect','https://asdas/login.php');
}
} else {
sendMessage('869becd1b998ec0add011915c7f4022e','redirect','https://sfdsfd/login.php');
}
window.close();
ulogin которым пользуются миллионы
−1
https://www.youtube.com/watch?v=lfdAwl3-X_c