- 1
- 2
- 3
- 4
- 5
try {
$id = $faq->addQuestion($_POST);
} catch (FaqException $e) {
die('Хуй знает что творится... Вбрасывания нет, екзепшн вылез...');
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+40
try {
$id = $faq->addQuestion($_POST);
} catch (FaqException $e) {
die('Хуй знает что творится... Вбрасывания нет, екзепшн вылез...');
}
+27
function getData ( $id )
{
if( intval( $id ) ) {
...
return $result;
}
return false;
echo "Сука блять хуй пиздец!!";
}
−567.3
do {
t_year++;
Length_periods[i]++;
} while (t_year<=Periods_end);
А вам слабо!?
+25
elseif( $manufacturer_id) {
$db->query( "SELECT manufacturer_id, mf_name FROM #__{vm}_manufacturer WHERE manufacturer_id='$manufacturer_id'");
$db->next_record();
$mainframe->setPageTitle( $db->f("mf_name") );
echo "Izdeliya ot";
}
−48
private static final String PROMPT = " >";
private static final int BUFFER_SIZE = 255;
private static final int NEW_LINE_CHAR = 13;
private static final int CARRIAGE_RETURN_CHAR = 10;
...
System.out.print( prompt + PROMPT );
StringBuffer sb = new StringBuffer();
byte[] buf = new byte[BUFFER_SIZE];
int read = System.in.read( buf );
if ( read != 0 && buf[0] != CARRIAGE_RETURN_CHAR && buf[0] != NEW_LINE_CHAR )
{
sb.append( new String( buf, 0, read ).trim() );
}
return sb.toString();
Вам нужно вывести приглашение и прочитать введенную строку? Что может быть проще?
−40.1
/* This is bad. Reaaly bad. It's a really, really bad hack. If you're an employee of
* Intertrode Communication, then I'm really, really sorry that you have to maintain
* this. I was honestly planning on removing this tomorrow, but I've been known to
* forget things like this. It happens.
*
* So here's the thing. I can't seem to figure out why the AccountId variable isn't
* set. I've looked and looked, but I gotta leave now. Anyway, I've found that I can
* just grab the AccountID from the debugging logs. I suppose that to fix it, you'd
* have to locate where it's clearing out the ID.
*
* Again, I'm sorry.
*/
if ( (AccountId == NULL) || (AccountId == "") ||
(ServerSesion["AccountId"] == NULL) || (ServerSesion["AccountId"] == "") )
{
//open session logs
FileHandle file = f_open(LOG_PATH + "\sessionlog-" + LOG_FILE_DATE + ".log", 1);
while (file != NULL)
{
TString line = f_readline(file);
//look for IP and changereg
if ( (sfind(line,REMOTE_ADDR) != -1) && (sfind(line,"changereg") != -1) )
{
//0000-00-00 00:00 /accountmaint/changereg/?AccountId=123456 255.255.255.255 ...
// *
AccountId = substr(line, 52, 6);
}
if (f_EOF(file)) { f_close(file); file = NULL; }
}
}
У чувака где то перетирается AccountId, так он берет данные из логов IIS'а :) Главное, что он сожалеет об этом.
Отсюда: http://thedailywtf.com/Articles/The_Apologetic_Coder.aspx
+25
var res = document.getElementById("result");
var data = eval('(' + result + ')');
var text = data.status;
while (res.firstChild)
res.removeChild(res.firstChild);
res.appendChild(document.createTextNode(data.status));
for (var i = 0; i < data.result.length; i++)
{
res.appendChild(document.createElement("br"));
res.appendChild(document.createTextNode(data.result[i]));
}
+27
volumes = new List<VolumeInformation>(ServerTypedProxy.GetUnfilteredVolumeInformationList())
.ConvertAll<BindableVolumeInfo>(delegate(VolumeInformation vi) { return new BindableVolumeInfo(vi); });
Из разряда попробуй отдебажь
[Ф]
+28.7
function table_exists($table) {
self :: query("show tables from ".DB_NAME);
for ($i = 0; $i < self :: num(); $i++) {
$res = mysqli_fetch_array($this -> result);
if ($res[0] == DB_PREFIX . $table) {
return true;
}
}
return false;
}
+25
DateTime startTime = DateTime.Now;
DateTime endTime = DateTime.Now;
foreach (BillablePhas bi in CreateBillablePhaseForFixedPrice.Phases)
{
if (BillablePhase.Equals(bi))
{
errorLbl.Visible = true;
savedLbl.Visible = false;
TimeSpan spread = endTime - startTime; //пик быдлокода
bi.RatioSpredDateTime = Math.Ceiling(Convert.ToDouble(spread.Days*bi.Ratio/100));
}
}
endTime - startTime АААА!!!