- 1
List<estExecPeriod> lst = TEDManager.getExecPeriodByIDExecWork(budget.IdBudget);
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+128.3
List<estExecPeriod> lst = TEDManager.getExecPeriodByIDExecWork(budget.IdBudget);
+128.2
switch (isHelp)
{
case false:
Str = "CTRL - Stop Rotate \n" +
"RMB - Move Quad \n" +
"WASD - Control \n";
isHelp = true;
break;
case true:
Str = "";
isHelp = false;
break;
}
как не правильно использовать switch :)
+128.2
public static string ValidateEmail(string Email)
{
try
{
if (Email.Trim() == string.Empty)
{
return "Empty Parameter - Email";
}
}
catch
{
return "Empty Parameter - Email";
}
return null;
}
+128
1:
Task task = Task.Factory.StartNew(delegate {
Program.CirCle(wsdlUrl, new List<int> { RayID });
});
Task.WaitAll(new Task[] { task });
2:
if (recordsForTerm.Length.Equals(0)) {
}
Консольная приблуда.
1. Создаем поток и лочим основной - зачем?
2. == для слабых?
+128
program st1r;
uses crt;
var
st:string;
n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,i:integer;
begin
clrscr;
n0:=0; n1:=0; n2:=0; n3:=0; n4:=0;
n5:=0; n6:=0; n7:=0; n8:=0; n9:=0;
Write('Введите строку, состоящую из цифр: ');
Readln (st);
for i:=1 to length (st) do
begin
if Pos('0',st[i])<>0 then n0:=n0+1;
if Pos('1',st[i])<>0 then n1:=n1+1;
if Pos('2',st[i])<>0 then n2:=n2+1;
if Pos('3',st[i])<>0 then n3:=n3+1;
if Pos('4',st[i])<>0 then n4:=n4+1;
if Pos('5',st[i])<>0 then n5:=n5+1;
if Pos('6',st[i])<>0 then n6:=n6+1;
if Pos('7',st[i])<>0 then n7:=n7+1;
if Pos('8',st[i])<>0 then n8:=n8+1;
if Pos('9',st[i])<>0 then n9:=n9+1;
end;
Writeln ('Количество вхождений в строку из цифр ',st);
Writeln ('0: ',n0);
Writeln ('1: ',n1);
Writeln ('2: ',n2);
Writeln ('3: ',n3);
Writeln ('4: ',n4);
Writeln ('5: ',n5);
Writeln ('6: ',n6);
Writeln ('7: ',n7);
Writeln ('8: ',n8);
Writeln ('9: ',n9);
readln(st);
end.
студенту было дано задание: "Для каждой цифры '0', '1', ... '9' подсчитать количество их вхождений в строку S".
+128
HTML:
<div id="calendar">
<div class="day">
<span class="num_job">5</span>
<span class="num_day">1</span>
<span class="name_day">пн</span>
<br/>
<span class="month">янв</span>
<span class="importance"></span>
</div>
<div class="day">
<span class="num_job">12</span>
<span class="num_day">2</span>
<span class="name_day">вт</span>
<br/>
<span class="month">янв</span>
<span class="importance"></span>
</div>
</div>
CSS:
body{
background: #ddd;
width: 1064px;
margin: 0 auto;
}
#calendar{
width: 1064px;
margin: 0 auto;
/* height: 500px;*/
display: inline-block;
background: #fff;
}
.day{
background: #f1f6f7;
border: 1px solid #dddbdb;
width: 130px;
height: 130px;
float: left;
margin: 10px;
}
.day:hover{
background: #6EB1BE;
cursor: pointer;
}
.day:hover .num_day, .day:hover .month, .day:hover .name_day{
color: #fff;
}
.day:hover .num_job{
color: #6EB1BE;
background: #fff;
}
.num_day{
font-family: Arial;
font-size: 72px;
font-weight: bold;
color: #1e99f7;
position: relative;
top: -15px;
left: 15px;
letter-spacing: -6px;
}
.month, .name_day{
position: relative;
font-family: Arial;
font-size: 24px;
color: #1e99f7;
}
.month{
top: -25px;
left: 37px;
}
.name_day{
font-size: 11px;
top: -12px;
left: 15px;
}
.num_job{
background: #1e99f7;
color: #fff;
display: block;
width: 25px;
height: 25px;
line-height: 25px;
text-align: center;
border-radius: 100%;
font-family: Arial;
font-size: 17px;
font-weight: bold;
position: relative;
top: 5px;
left: 100px;
}
Вот я сверстал календарик. Подойдёт ли такой код для рабочего варианта? Что добавить? Что убрать? Как будет лучше?
+128
#include <stdio.h>
int main()
{
int i,g;
char a[26];
a[0]='a';
a[1]='b';
a[2]='c';
a[3]='d';
a[4]='e';
a[5]='f';
a[6]='g';
a[7]='h';
a[8]='i';
a[9]='j';
a[10]='k';
a[11]='l';
a[12]='m';
a[13]='n';
a[14]='o';
a[15]='p';
a[16]='q';
a[17]='r';
a[18]='s';
a[19]='t';
a[20]='u';
a[21]='v';
a[22]='w';
a[23]='x';
a[24]='y';
a[25]='z';
for(i=0;i<25;i++)
{
for(g=0;g<i+1;g++)
{
printf("%c",a[g]);
}
if(g!=25)
printf("\n");
}
return 0;
}
К предыдущему коду.
+128
http://james-iry.blogspot.ru/2009/05/brief-incomplete-and-mostly-wrong.html
просто оставлю здесь это.
+128
b *, strong * {
font-weight: bold;
}
.reset {
margin-top: 0px !important;
margin-right: 0px !important;
margin-bottom: 0px !important;
margin-left: 0px !important;
}
.formEnter form input {
float: right;
width: 155px;
padding: 3px 0;
padding-left: 5px;
border: 1px solid #6a6a6a;
}
.formEnter form input[type=submit] {
display: inline-block;
/* me: удалил лишнее */
}
.new-select-style-wpandyou select {
width: 125px;
padding: 6px 5px 5px 10px;
border: 0;
border-radius: 0;
background: transparent;
line-height: 1;
-webkit-appearance: none;
text-transform: uppercase;
color: #484343;
}
.ggg {
display: none;
}
.ggg, .ggg embed {
width: 1920px;
height: 955px;
}
.leftFoot {
float: left;
width: 220px;
}
.rightFoot {
float: right;
/* me: свободный размер видимо ...*/
}
.countbox-days1 span,
.countbox-days2 span,
.countbox-days3 span,
.countbox-hours1 span,
.countbox-hours2 span,
.countbox-mins1 span,
.countbox-mins2 span,
.countbox-secs1 span,
.countbox-secs2 span {
background: url(../../img/client/flip_gradient.png);
background-repeat: no-repeat;
position: absolute;
display: block;
height: 60px;
width: 35px;
}
/*Timer Конец*/
/*Футэр конец*/
.videoLightPlayerClick {
padding-top: 0px !important;
}
.x, .x2 {
/* me: удалил лишнее */
}
.poster {
display: inline-block;
vertical-align: top;
float: left;
/* me: удалил лишнее */
}
/*Награды*/
.nagradiBlock {
width: 92%;
margin: 60px auto;
}
.nagradiSmall {
display: inline-block;
vertical-align: top;
margin-right: 70px;
}
.feedKapcha {
/* me: удалил лишнее */
}
Несколько примеров правильного css и классов с одного места, а их там очень много. Весьма улыбнуло с утра
+128
<a href="#" id="foo" onclick="this.nextSibling.style.display=''; return!1;">Click here for view</a><p style="display: none;">
<noscript>
</p>
<style type="text/css"> a#foo { display:none; } </style>
<p>
</noscript>
/*... some info ...*/
</p>
Баян, не? Вот. Наговнокодилось. captcha=5555