- 1
- 2
- 3
- 4
bool b = false;
while (!b) {
// ...
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Всего: 1419
+81
bool b = false;
while (!b) {
// ...
}
+154
"IF ACK01 <> ""IB"" or ""IR""
{
If Partner = ""CARDINAL HEALTH"" THEN
{
if ACK01= ""IA"" and not exist LIN.SCC.4017=1 THEN ""017"" ELSE ""011""
Else
{
if Partner = ""NOVANT HEALTH"" OR ""KAISER"" OR ""KAISER HAWAII""
then
CASE (ACK01)
""IA"": THEN ""068""
""IR"" : THEN ""100""
""IC"" : THEN ""068""
else
BLANK
}
}
}"
из ТЗ
+146
<?php
class db {
function db_conn ($host,$user,$pass,$db) {
if(!($this->link = @mysqli_connect($host,$user,$pass)))
{
echo "<font color=\"red\">Error:</font> connect to host: $host";
//exit();
}
if(!mysqli_select_db($this->link,$db))
{
echo "<font color=\"red\">Error:</font> select database $db";
exit();
}
return $this->link;
}
function sql_query ($query) {
$result = mysqli_query($this->link, $query);
if (!$result)
{
$this->error_msg = mysqli_error ($result);
return $this->error_msg;
}
return $result;
}
function sql_fetch_assoc ($query) {
$res=$this->sql_query($query);
//$array = array();
$row = mysqli_fetch_array($res);
mysqli_free_result($res);
return $row;
}
}
?>
+148
<?php
class db {
function db_conn ($host,$user,$pass,$db) {
if((!$this->link = @mysqli_connect($host,$user,$pass)))
{
echo "<font color=\"red\">Error:</font> connect to host: $host";
exit();
}
if(!mysqli_select_db($this->link,$db))
{
echo "<font color=\"red\">Error:</font> select database $db";
exit();
}
}
function sql_query ($query) {
$this->link = mysqli_query($this->link, $query);
if (!$this->link)
{
$this->error_msg = mysqli_error ($this->link);
return $this->error_msg;
}
return $this->link;
}
function sql_fetch_assoc ($query) {
$res=$this->sql_query($query);
$array = array();
$row = mysqli_fetch_array($res);
/*{
$array[]=$cur;
}*/
mysqli_free_result($res);
return $row;
}
}
?>
+151
<?
$sess_del ="NEWCONTENT";
$sd_flag =base64_encode($sess_del);
?>
<td width="127"><a href="createeflyer.php?s_flag=<?=$sd_flag?>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image12','','images/navig-ovr_12.jpg',1)"><img src="<?=$imagesrc2?>" alt="createflyer" name="Image12" width="127" height="39" border="0" id="Image12" /></a></td>
Продолжение индийского эпоса (#1244-#1245, #1248-#1251)
-Назовем это "Операция Ы"!
-Почему "Ы"?
-Чтобы никто не догадался
+141
if((5<a).toString() == "true")
{
ля-ля
}
+149
procedure main
begin
var i = 100;
for(var y = 0; y<=i; y++) {
echo i+y;
echo "\n";
}
end;
что это за язык?
+146
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Mask, DBCtrls, DB, DBTables, Grids, DBGrids;
type
TForm_magnituda = class(TForm)
DataSource2: TDataSource;
Table1: TTable;
Label1: TLabel;
Label2: TLabel;
Button1: TButton;
Button2: TButton;
DBGrid1: TDBGrid;
Table1Id: TStringField;
Table1Data: TStringField;
Table1Shirota: TStringField;
Table1Dolgota: TStringField;
Table1Magnituda: TStringField;
Table1Glubina: TStringField;
Table1Bal: TStringField;
Table1Local: TStringField;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form_magnituda: TForm_magnituda;
implementation
uses unit1;
{$R *.dfm}
procedure TForm_magnituda.Button1Click(Sender: TObject);
begin
form1.show;
form_magnituda.Hide;
end;
procedure TForm_magnituda.Button2Click(Sender: TObject);
begin
form_magnituda.Table1.Append;
end;
end.
+148
unit form_view;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, Grids, DBGrids, DB, DBTables, StdCtrls, Mask, DBCtrls,
ComCtrls;
type
TF_view = class(TForm)
MMenu: TMainMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
Table1: TTable;
DataSource1: TDataSource;
N6: TMenuItem;
N7: TMenuItem;
N8: TMenuItem;
N9: TMenuItem;
N10: TMenuItem;
N11: TMenuItem;
StatusBar1: TStatusBar;
N4: TMenuItem;
N5: TMenuItem;
N12: TMenuItem;
N13: TMenuItem;
DBGrid1: TDBGrid;
Button_next: TButton;
Button_prior: TButton;
Button_first: TButton;
Button_last: TButton;
Button_new: TButton;
Table1Id: TStringField;
Table1Data: TStringField;
Table1Shirota: TStringField;
Table1Dolgota: TStringField;
Table1Magnituda: TStringField;
Table1Glubina: TStringField;
Table1Bal: TStringField;
Table1Local: TStringField;
procedure N1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure N5Click(Sender: TObject);
procedure N7Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure N11Click(Sender: TObject);
procedure Button_firstClick(Sender: TObject);
procedure Button_nextClick(Sender: TObject);
procedure Button_priorClick(Sender: TObject);
procedure Button_lastClick(Sender: TObject);
procedure Button_newClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
F_view: TF_view;
implementation
uses unit2, form_poisk;
{$R *.dfm}
procedure TF_view.N1Click(Sender: TObject);
begin
close;
end;
procedure TF_view.Button2Click(Sender: TObject);
begin
form_magnituda.Show;
end;
procedure TF_view.N5Click(Sender: TObject);
begin
f_view.Hide;
form_magnituda.Show;
end;
procedure TF_view.N7Click(Sender: TObject);
begin
poisk.Show;
end;
procedure TF_view.N3Click(Sender: TObject);
begin
f_view.Table1.Active:=false;
f_view.Hide;
f_view.Show;
f_view.Button_next.Visible:=true;
f_view.Button_prior.Visible:=true;
f_view.Button_first.Visible:=true;
f_view.Button_last.Visible:=true;
f_view.Button_new.Visible:=false;
f_view.DBGrid1.Visible:=true;
f_view.StatusBar1.SimpleText:=' режим просмотра базы';
продолжение
+148
unit vhod;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, StdCtrls, DBTables, Grids, DBGrids, Mask, DBCtrls, jpeg,
ExtCtrls, Menus;
type
TForm_vhod = class(TForm)
Image1: TImage;
Label1: TLabel;
Button_vhod: TButton;
Button_vyhod: TButton;
procedure Button_vhodClick(Sender: TObject);
procedure Button_vyhodClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form_vhod: TForm_vhod;
implementation
uses form_view;
{$R *.dfm}
procedure TForm_vhod.Button_vhodClick(Sender: TObject);
begin
f_view.Show;
end;
procedure TForm_vhod.Button_vyhodClick(Sender: TObject);
begin
close;
end;
end.
база данных