- 1
Currently, the official WordPress distribution only supports the MySQL database engine.
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
0
Currently, the official WordPress distribution only supports the MySQL database engine.
https://codex.wordpress.org/Using_Alternative_Databases
+5
<script type="text/javascript">
function gopage1() {
<? $query = "INSERT INTO orders2 (id, price, metod, bill) VALUES ('$idp','$price','webmoney','$bill')";
mysql_query($query) or die(mysql_error()); ?>
}
function gopage2() {
<? $query = "INSERT INTO orders2 (id, price, metod, bill) VALUES ('$idp','$price','qiwi','$bill')";
mysql_query($query) or die(mysql_error()); ?>
}
function gopage3() {
<? $query = "INSERT INTO orders2 (id, price, metod, bill) VALUES ('$idp','$price','yandex','$bill')";
mysql_query($query) or die(mysql_error()); ?>
}
</script>
<?php
if(1 == config_item('site_pwebmoney')){
echo "<form method='POST' action=''?gpay'>
<input type='image' onclick='gopage1()' src='http://i.imgur.com/ShsyZEc.png' style='height:45px;' name='webmoney' value='webmoney'>
</form>";
}
else{
}
?>
<br>
<?php
if(1 == config_item('site_pqiwi')){
echo "<form method='POST' action='?gpay'>
<input type='image' onclick='gopage2()' src='http://i.imgur.com/RkZSEtW.png' style='height:45px;' name='qiwi' value='qiwi'>
</form>";
}
else{
}
?>
<br>
<?php
if(1 == config_item('site_pyandex')){
echo "<form method='POST' action='?gpay'>
<input type='image' onclick='gopage3()' src='http://i.imgur.com/JLR7kHV.png'style='height:45px;' name='yandex' value='yandex'>
</form>";
}
else{
}
?>
нашел это на одном форуме про php .
а после этого пояснения автор кода , я заржал во весь голос: "Недавно изучил основы JavaScript, и столкнулся с проблемой."
+4
/^.{0}$/.test('') // true
/^.{0,}$/.test('') // true
/^.{0,1}$/.test('') // true
/^.{,1}$/.test('') // false
http://www.ecma-international.org/ecma-262/5.1/#sec-15.10
/^.{,1}$/.test('.{,1}') // true
+6
if (value is Int32)
{
Int32 prio = Int32.Parse(value.ToString());
}
+2
function coolSplit(str, pattern) {
var result = [];
while(1){
var m = str.match(pattern);
if(!m) {
if(str) result.push(str);
return result;
}
if(m.index) result.push(str.substr(0, m.index));
result.push(str.substr(m.index, m[0].length));
str = str.substr(m.index + m[0].length);
}
}
Из шифроскрипта. https://github.com/1024--/govnokod.ru-userscripts/commit/898e6195b9799853b08a01834ce55f8d780757f3#diff-40cd32e1559d395399816968845cb034R151
coolSplit(str, /expr/) ≡ str.split(/(expr)/) // Говнокод обучающий
+2
string[] array=new string[10];
array[0] = "?";
array[1] = "?";
array[2] = "?";
array[3] = "?";
array[4] = "?";
array[5] = "?";
array[6] = "?";
array[7] = "?";
array[8] = "?";
....
if (DS.Tables[0].Rows[i][3].ToString() == "1")
{
checkBox20.Checked = true;
}
if (DS.Tables[0].Rows[i][4].ToString() == "1")
{
checkBox23.Checked = true;
}
if (DS.Tables[0].Rows[i][5].ToString() == "1")
{
checkBox22.Checked = true;
}
if (DS.Tables[0].Rows[i][6].ToString() == "1")
{
checkBox25.Checked = true;
}
if (DS.Tables[0].Rows[i][7].ToString() == "1")
{
checkBox24.Checked = true;
}
if (DS.Tables[0].Rows[i][8].ToString() == "1")
{
checkBox27.Checked = true;
}
if (DS.Tables[0].Rows[i][9].ToString() == "1")
{
checkBox11.Checked = true;
}
...
if (checkBox17.Checked)
{
array[0] = "application/";
}
if (checkBox18.Checked)
{
array[1] = "audio/";
}
if (checkBox21.Checked)
{
array[2] = "example/";
}
if (checkBox20.Checked)
{
array[3] = "image/";
}
if (checkBox23.Checked)
{
array[4] = "message/";
}
if (checkBox22.Checked)
{
array[5] = "model/";
}
if (checkBox25.Checked)
{
array[6] = "multipart/";
}
if (checkBox24.Checked)
{
array[7] = "text/";
}
if (checkBox27.Checked)
Дали на рецензию одну научную работу...
+3
public SomeLongNameSpace.PolicyPremiumReturnType ProcessPremiums(
int userID,
int divisionID,
string ObjectCode,
int iPolicyID,
int iBulkEndorsementID,
System.Data.DataTable dtClientPremiums,
System.Data.DataTable dtClientPremiumInterests,
System.Data.DataTable dtRiskCommissions,
System.Data.DataTable dtBrokerages,
System.Data.DataTable dtDiscounts,
System.Data.DataTable dtApportionments,
System.Data.DataTable dtUWGroups,
System.Data.DataTable dtUWGroupSettings,
System.Data.DataTable dtUWGroupPremiums,
System.Data.DataTable dtRiskDeclarations,
System.Data.DataTable dtRiskDeclarationsInterests,
int clientPaymentIntervalDays,
int uwDefaultPaymentIntervalDays,
int uwPaymentIntervalDays,
System.Data.DataTable dtSchedulesLimitDetails,
XII.Integration.GlobalXB.v1_4.PolicyGL.CommissionProcessingFlags commissionProcessingFlags,
bool isOverrideWarranties,
string transactionDescription,
string TechnicalContactName,
bool isCreateDeclarationWithoutInterests,
int clientRPPaymentIntervalDays,
System.Data.DataTable deferredPayments)
{
return base.Channel.ProcessPremiums(userID, divisionID, ObjectCode, iPolicyID, iBulkEndorsementID, dtClientPremiums, dtClientPremiumInterests, dtRiskCommissions, dtBrokerages, dtDiscounts, dtApportionments, dtUWGroups, dtUWGroupSettings, dtUWGroupPremiums, dtRiskDeclarations, dtRiskDeclarationsInterests, clientPaymentIntervalDays, uwDefaultPaymentIntervalDays, uwPaymentIntervalDays, dtSchedulesLimitDetails, commissionProcessingFlags, isOverrideWarranties, transactionDescription, TechnicalContactName, isCreateDeclarationWithoutInterests, clientRPPaymentIntervalDays, deferredPayments);
}
few params
−1
continueSaving(item, item);
В node.js 3 вызова функции continueSaving, первый объект новый, второй старый из бд, в самой функции проверяется наличие старого объекта и если есть то он используется, в остальных вызовах все нормально.
+3
$imageBinding['isHidden'] = $image->isHidden() === true ? true : false;
+7
editfobjectobject($fobject_id,$fobject_object_id,
$object_type_id,$fobject_status_id,$all_sq,
$live_sq,$kitchen_sq,$floor,$balcony_id,
$su_id,$windows_id,$repair_id,
$number,$plain,$tplains,
$fcomment,$cost,$all_cost,
$manager_id,$delplain,$dic_room_type_id,
$dic_gazplit_id,$dic_phone_id,
$dic_window_type_id,$dic_pstate_id,$dic_dfloor_id,
$dic_internet_id,$dic_park_id,$dic_secur_id,
$dic_door_id,$dic_lift_id,$full_cost,$is_torg,$task_shema_id);
а до конца самой функции я тогда даже недоскроллил)