- 1
- 2
- 3
- 4
for (int i = 1; i != chars.Length; i++ )
{
charlist.Items.Add(chars[i]);
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+138
for (int i = 1; i != chars.Length; i++ )
{
charlist.Items.Add(chars[i]);
}
http://kn1fe-zone.ru/index.php?threads/Лаунчер-с-автовходом-на-аккаунт-и-перса.430/
+156
for($i = 1; $i < $conf->nb_images + 1; $i++)
{
$ext_name = chr(ord('a')+$i-1);
?>
<label for="ad_picture<?php echo $i;?>"><?php echo ADSMANAGER_FORM_AD_PICTURE." ".$i; ?></label>
<input id="ad_picture<?php echo $i;?>" type="file" name="ad_picture<?php echo $i;?>" />
<?php
if ($isUpdateMode) {
$pic = $mosConfig_absolute_path."/images/$option/projects/".$ad_id.$ext_name."_t.jpg";
if ( file_exists( $pic)) {
echo "<img src='".$mosConfig_live_site."/images/$option/projects/".$ad_id.$ext_name."_t.jpg' align='top' border='0' alt='image$ad_id' />";
echo "<input type='checkbox' name='cb_image$i' value='delete' />".ADSMANAGER_AD_DELETE_IMAGE;
}
}
echo "<br />";
}
Угадайте что за CMS :)))
−118
set -xexexe
из тестового скрипта. началось все с очепятки.
в дурмане тупого писания тупых тестов, не мог остановится хихикать.
+57
class C3D
{
public:
//C3D() {} // Constructor
//~C3D() {} // Destructor
void(*init)(float R, float A, float B, float Rmin, float Rmax, float Bmin, float Bmax); // Initialize work with 3D standard camera
void(*setCamera)(int iType); // Set type of camera
void(*setPosition)(float x, float y, float z); // Set position
void(*setRender3D)();
UINT(*addMesh)(LPCWSTR sMesh); // Add Mesh
void(*renderMesh)(UINT idMesh, float x, float y, float z);
void(*renderMeshSubset)(UINT idMesh, UINT idSubset, float x, float y, float z);
void(*renderMeshSubsetRotateX)(UINT idMesh, UINT idSubset, float x, float y, float z, float a);
// простыня указателей на функции урезана
void setHModule(HMODULE hLib)
{
m_hLib = hLib;
(FARPROC &)init = GetProcAddress(m_hLib, "init3D"); // Initialize work with 3D standard camera
(FARPROC &)setCamera = GetProcAddress(m_hLib, "setCamera"); // Set type of camera
(FARPROC &)setPosition = GetProcAddress(m_hLib, "setPosition"); // Set position
(FARPROC &)setRender3D = GetProcAddress(m_hLib, "setRender3D");
(FARPROC &)addMesh = GetProcAddress(m_hLib, "addMesh"); // Add Mesh
(FARPROC &)renderMesh = GetProcAddress(m_hLib, "renderMesh");
(FARPROC &)renderMeshSubset = GetProcAddress(m_hLib, "renderMeshSubset");
(FARPROC &)renderMeshSubsetRotateX = GetProcAddress(m_hLib, "renderMeshSubsetRotateX");
// простыня GetProcAddress урезана
}
protected:
HMODULE m_hLib; // NetWars.dll
};
Некий SDK для MMO-игр за авторством одного известного разработчика.
+80
if (!driver.findElement(By.id(DD_LAUNCH_ID)).equals(null)) {
pause(1000);
}
Тогда уж почему не null.equals(...)?
+60
vector <float> items;
float *x;
for(int i = 0; i<100; i++) {
x = new float;
*x = 1.0f;
items.push_back(*x);
};
оттуда...
+138
public List<string> AutoPublishProjectDepartmentNames { get; private set; }
public string AutoPublishProjectDepartments
{
get { return _projectDepartments; }
set
{
_projectDepartments = value;
AutoPublishProjectDepartmentNames.Clear();
var departments = _projectDepartments.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
//Get EPT Names
foreach (var department in departments)
{
try
{
if (department.Length == 36 || department.Length == 38)
{
var departmentUid = new Guid(department);
AutoPublishProjectDepartmentNames.Add(SqlInstance.GetDepartmentName(departmentUid));
continue;
}
}
catch (FormatException)
{
}
//Not a guid
AutoPublishProjectDepartmentNames.Add(department);
}
}
}
Очень хитрая пропертя, пока не засетишь одну пропертю - другая не будет работать. А еще она с гуидами работает. Ооочень хитрая. Юсфуль-туль.
+118
import static com.google.gwt.query.client.GQuery.*;
import com.google.gwt.query.client.Function;
public void onModuleLoad() {
//Hide the text and set the width and append an h1 element
$("#text").hide()
.css("width", "400px")
.prepend("<h1>GwtQuery Rocks !</h1>");
//add a click handler on the button
$("button").click(new Function(){
public void f() {
//display the text with effects and animate its background color
$("#text").as(Effects)
.clipDown()
.animate("backgroundColor: 'yellow'", 500)
.delay(1000)
.animate("backgroundColor: '#fff'", 1500);
}
});
}
Не ГК, но мне показалось забавно.
https://code.google.com/p/gwtquery/
+165
var shops=new Array();
shops[shops.length] = new Array('',' ');
shops[shops.length] = new Array(' The Jewel Box', '135956406_923');
shops[shops.length] = new Array(' Склад 1', '135956406_923');
И таких вызовов порядка 2к
via http://pickpoint.ru/monitoring/
+59
std::transform( keyframes.begin(), keyframes.end(), std::back_inserter( result ),
boost::bind( & qMakePair< KeyframeType::first_type, KeyframeType::second_type >,
boost::bind( & Prm::TType::view, _1 ),
boost::bind( & Prm::Time::value, boost::bind( & Prm::TType::time, _1 ) ) ) );
boost bind головного мозга