-
Лучший говнокод
- В номинации:
-
- За время:
-
-
+136
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
/*
* Just a wifi driver hooker.
*
* Yongle Lai @ 2009-05-10 @ Rockchip
*/
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
MODULE_LICENSE("Dual BSD/GPL");
#ifdef CONFIG_MODVERSIONS
#define MODVERSIONS
#include <linux/modversions.h>
#endif
//#define OLD_WIFI_IFACE
#ifdef OLD_WIFI_IFACE
extern int mv88w8686_if_sdio_init_module(void);
extern void mv88w8686_if_sdio_exit_module(void);
#else
extern int rockchip_wifi_init_module(void);
extern void rockchip_wifi_exit_module(void);
#endif
static int wifi_launcher_init(void)
{
int ret;
printk("=======================================================\n");
printk("==== Launching Wi-Fi driver! (Powered by Rockchip) ====\n");
printk("=======================================================\n");
#ifdef OLD_WIFI_IFACE
ret = mv88w8686_if_sdio_init_module();
if (ret) /* Try again */
ret = mv88w8686_if_sdio_init_module();
#else
ret = rockchip_wifi_init_module();
//if (ret) /* Try again */
// ret = rockchip_wifi_init_module();
#endif
return ret;
}
static void wifi_launcher_exit(void)
{
printk("=======================================================\n");
printk("== Dis-launching Wi-Fi driver! (Powered by Rockchip) ==\n");
printk("=======================================================\n");
#ifdef OLD_WIFI_IFACE
mv88w8686_if_sdio_exit_module();
#else
rockchip_wifi_exit_module();
#endif
}
module_init(wifi_launcher_init);
module_exit(wifi_launcher_exit);
Вот так вот, просто и незатейливо на RK3188 включается и выключается вайфай.
Necromant,
25 Ноября 2013
-
+153
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
App.ns.SomeClass.prototype = {
addMessage: function(status, msg, timeDelay) {
if (status === false || status === this.STATUS_ERROR) {
status = this.STATUS_ERROR;
delay = timeDelay || 5; // default delay of msg box for error is 5 seconds.
}
if (!timeDelay) {
// 1 character - 1/7 sec
delay = msg.length / 7;
if ((delay < 3) && !(timeDelay)) {
delay = 3;
} else if ((delay > 30) && !(timeDelay)) {
delay = 30;
}
}
// показываем messagebox
}
};
Кручу-верчу, запутать хочу.
Elvenfighter,
24 Ноября 2013
-
+160
- 1
- 2
- 3
if(floor($info['http_code'] / 100) >= 4) {
throw $this->castError($result);
}
Библиотека интеграции с Mandrill.
korchasa,
20 Ноября 2013
-
+131
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
try
{
m = (int)Convert.ToInt32(num[1]);
}
catch
{
Console.WriteLine("Invalid parametr");
return true;
}
//...................................................
try
{
matrix[i, j] = (float)Convert.ToDouble(num[j]);
}
catch
{
Console.WriteLine("Invalid matrix");
return false;
}
Лаба одногруника...
Michigan,
09 Ноября 2013
-
+161
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
this.ShowHideNoticeDate = function () {
if ($("#associateNotice").is(':checked')) {
jsNoticeField.setFieldValue(1);
$("#associateNotice").parent().parent().parent().parent().parent().parent().next().show();
$("#associateNotice").parent().parent().parent().parent().parent().parent().next().children(1).children(0).children(0).children(0).children(0).children(0).children(1).val("");
} else {
jsNoticeField.setFieldValue(0);
$("#associateNotice").parent().parent().parent().parent().parent().parent().next().hide();
$("#associateNotice").parent().parent().parent().parent().parent().parent().next().children(1).children(0).children(0).children(0).children(0).children(0).children(1).val("");
}
};
Голландский джаваскриптик)))
RomashkaPro,
08 Ноября 2013
-
+151
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
function recalcMeal() {
jQuery('.recalc2').bind("click", function () {
pusto = '';
jQuery.each(jQuery('.vuborka input'), function (index) {
var allInputValueMeal = parseInt(jQuery(this).val());
if (allInputValueMeal != 0 && $.browser.msie) {
for (var i = 0; i < allInputValueMeal; i++) {
pusto = pusto + jQuery(this).parent().parent().parent().next().find('.boxtypecode').val() + ';';
}
}
else if (allInputValueMeal != 0 && !($.browser.msie)) {
for (var i = 0; i < allInputValueMeal; i++) {
pusto = pusto + jQuery(this).parent().parent().parent().next().val() + ';';
}
}
});
jQuery('.selectedcabins').val(pusto);
});
}
Код который я поддерживаю от старого работника.
sladkijBubaleh,
16 Октября 2013
-
+141
- 1
- 2
- 3
- 4
Мартышка и слон решили укоротить удава. Слон говорит "А давайте ему ебало отрежем"
-Мартышка: нет, без ебала он не выживет, нужно хвост отрезать, но докуда?
Слон: до ебала
АХАХАХАХАХАХАХА
Не говнокод, просто забавно
PragramistOtBoga,
12 Октября 2013
-
+149
- 1
- 2
- 3
- 4
- 5
public function fetchEmployees()
{
global $result, $check_u_id, $second_check_u_id, $query123;
....
__proto__,
30 Сентября 2013
-
+129
- 1
- 2
var tiffFileName = GetRandomNameForTiffFile() +
currentObject.FileName.Substring(currentObject.FileName.LastIndexOf(".", StringComparison.Ordinal) > 0 ? currentObject.FileName.LastIndexOf(".", StringComparison.Ordinal) : 0);
Это наверное тоже бояный пример говнокода, но всё же меня порадовал
Smekalisty,
27 Сентября 2013
-
+153
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
$("#ChildrenCount")
.keyup(function () {
var $this = $(this);
if ($this.val() > maxChild) {
$this.val(maxChild);
}
})
.blur(function () {
var $this = $(this);
if ($this.val().toString().match(/^\d+$/) == null) {
for (var i = 0; i < viewModel.children().length; i++) {
viewModel.children.remove(i);
}
$this.val(0);
}
else if ($this.val() === NaN) {
for (var i = 0; i < viewModel.children().length; i++) {
viewModel.children.remove(i);
}
$this.val(0);
}
});
когда джуниор использует jquery в проекте с knockout
sladkijBubaleh,
20 Сентября 2013