- 1
- 2
if(this==NULL)
return;
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+23
if(this==NULL)
return;
+155
switch(navigator.appName) {
case "Microsoft Internet Explorer":
Key = "event.ctrlKey && event.keyCode == 13";
document.onkeydown = get_key;
break;
case "Netscape":
Key = "(e.modifiers == 2 && e.which == 10) || (e.ctrlKey && e.which == 13)";
document.captureEvents(Event.KEYDOWN);
document.onkeydown = get_key;
break;
}
}
function get_key(e) {
if (eval(Key)) {
if (check_postform()){
check_submit();
document.postform.submit();
submit_once(document.postform);
} else {return false}
}
http://forum.ixbt.com/
+77
/**
* Returns the an array (length 1) containing the checkbox menu item
* label or null if the checkbox is not selected.
* @see ItemSelectable
*/
public synchronized Object[] getSelectedObjects() {
if (state) {
Object[] items = new Object[1];
items[0] = label;
return items;
}
return null;
}
java.awt.CheckboxMenuItem
+74
reader = new BufferedReader(new FileReader(file));
//null means file end
while ((tempString = reader.readLine()) != null) {
if(tempString !=null && tempString.indexOf('=')>0){
sheet.addCell(new Label(KEY_COLUMN,++ROW, tempString.substring(0,tempString.indexOf('='))));
sheet.addCell(new Label(ENGLISH_COLUMN,ROW, tempString.substring(tempString.indexOf('=')+1)));
}
}
reader.close();
Вот так мы парсим файл *.properties в Java.
+54
/**
* Грабли - наше всьо
* @return string
*/
function toPage()
{
...
}
прекрасно задокументированная функция
+5
template<class T>
bool IsAligned(T SizeOrAddress, const size_t AlignStep)
{
return SizeOrAddress==Align(SizeOrAddress, AlignStep);
}
−121
Если НЕ Отказ И ЭтоНовый() и Роль = Справочники.РолиКонтактныхЛиц.НайтиПоНаименованию("Директор") Тогда
Пол = Перечисления.ПолФизическихЛиц.Мужской;
КонецЕсли;
Тысячи теток мужского пола негодуют.
+71
protected T mutex;
public Mutex(final Class<?> clazz) {
if (this.mutex != null) {
this.mutex = null;
}
Runtime.getRuntime().addShutdownHook(this);
}
ну а вдруг?
+71
@SuppressWarnings("deprecation")
static long startHourInMS() {
final Date date = new Date();
date.setMinutes(0);
date.setSeconds(0);
return date.getTime();
}
Where the Time Stood Still...
+15
void* const allocateOrDie(const size_t Size) throw();
Ультиматум. :)