+159.8        
        
                            - 1
 - 2
 - 3
 - 4
 - 5
 - 6
 
                        document.getElementById('f1').style.display = ((document.getElementById('f1').style.display=='none'&&id==1)?'block':'none');
 document.getElementById('t1').style.display = ((document.getElementById('f1').style.display=='block')?'none':'block');
 document.getElementById('f2').style.display = ((document.getElementById('f2').style.display=='none'&&id==2)?'block':'none');
 document.getElementById('t2').style.display = ((document.getElementById('f2').style.display=='block')?'none':'block');
 document.getElementById('f3').style.display = ((document.getElementById('f3').style.display=='none'&&id==3)?'block':'none');
 document.getElementById('t3').style.display = ((document.getElementById('f3').style.display=='block')?'none':'block');
                                     
        
            Есть три формы, нужно показывать только одну. При клике на заголовок форма разворачивается, а вместо остальных появляются подсказки.
        
        
            
 erfen,
            31 Января 2010
        
        
        
        
        
        
        
                +166.1        
        
                            - 01
 - 02
 - 03
 - 04
 - 05
 - 06
 - 07
 - 08
 - 09
 - 10
 - 11
 - 12
 - 13
 - 14
 - 15
 - 16
 - 17
 - 18
 - 19
 - 20
 - 21
 - 22
 - 23
 - 24
 - 25
 - 26
 - 27
 - 28
 - 29
 - 30
 - 31
 - 32
 - 33
 - 34
 - 35
 - 36
 - 37
 - 38
 - 39
 - 40
 - 41
 - 42
 - 43
 - 44
 - 45
 - 46
 - 47
 - 48
 - 49
 - 50
 - 51
 - 52
 - 53
 - 54
 - 55
 - 56
 - 57
 - 58
 - 59
 - 60
 - 61
 - 62
 - 63
 - 64
 - 65
 - 66
 - 67
 - 68
 - 69
 - 70
 - 71
 - 72
 - 73
 - 74
 - 75
 - 76
 - 77
 - 78
 - 79
 - 80
 - 81
 - 82
 - 83
 
                        <?php
 function menu($menu_punkt="Главная")
{
if ($menu_punkt == "Главная")
{
echo "<p>Главная</p>";
}
else 
{
echo "<p><a href='index.php'>Главная</a></p>";
}
if ($menu_punkt == "Книги")
{
echo "<p>Книги</p>";
}
else 
{
echo "<p><a href='index.php'>Книги</a></p>";
}
if ($menu_punkt == "Уроки")
{
echo "<p>Уроки</p>";
}
else 
{
echo "<p><a href='index.php'>Уроки</a></p>";
}
if ($menu_punkt == "Статьи")
{
echo "<p>Статьи</p>";
}
else 
{
echo "<p><a href='index.php'>Статьи</a></p>";
}
/* Еще около 10 пунктов меню */ 
if ($menu_punkt == "О сайте")
{
echo "<p>О сайте</p>";
}
else 
{
echo "<p><a href='about.php'>О сайте</a></p>";
}
}
?>
                                     
        
            Меню сайта...
        
        
            
 pee,
            31 Января 2010
        
        
        
        
        
        
        
                +103.3        
        
                            - 1
 - 2
 - 3
 - 4
 - 5
 - 6
 - 7
 - 8
 - 9
 
                        public static IntPtr StringToBSTR(string s)
{
    //...
    if ((s.Length + 1) < s.Length)
    {
        throw new ArgumentOutOfRangeException("s");
    }
    //...
}
                                     
        
            System.Runtime.InteropServices.Marshal Не знаю зачем это, но мне показалось смешным.
        
        
            
 psina-from-ua,
            30 Января 2010
        
        
        
        
        
        
        
                +144.9        
        
                            - 01
 - 02
 - 03
 - 04
 - 05
 - 06
 - 07
 - 08
 - 09
 - 10
 - 11
 - 12
 - 13
 - 14
 - 15
 - 16
 - 17
 
                        public class YobaButton : Button
{
    public YobaButton ()
    {
        this.Click += (s1, e1) =>
        {
            MessageBox.Show ("Оп хуй.");
 
            this.Click -= (EventHandler)Delegate.CreateDelegate (typeof (EventHandler), this, (MethodInfo)MethodBase.GetCurrentMethod ());
 
            this.Click += (s2, e2) =>
            {
                MessageBox.Show ("Оп тупой хуй.");
            };
        };
    }
}
                                     
        
            
        
        
            
 Yurik,
            30 Января 2010
        
        
        
        
        
        
        
                +160.7        
        
                            - 1
 
                        for ($post=$last_post-$skip_posts; $post>=$last_post-($skip_posts+$post_on_page)+1; $post--){
                                     
        
            родил постраничный вывод постов
        
        
            
 stepushyn,
            30 Января 2010
        
        
        
        
        
        
        
                +87.6        
        
                            - 1
 - 2
 - 3
 - 4
 - 5
 
                        public class CheckHouseNumber implements HouseNumberChecker {
//код
}
                                     
        
            
        
        
            
 chiffa,
            30 Января 2010
        
        
        
        
        
        
        
                +136.7        
        
                            - 01
 - 02
 - 03
 - 04
 - 05
 - 06
 - 07
 - 08
 - 09
 - 10
 - 11
 - 12
 - 13
 - 14
 - 15
 - 16
 - 17
 - 18
 - 19
 - 20
 - 21
 - 22
 - 23
 - 24
 - 25
 - 26
 - 27
 - 28
 - 29
 - 30
 - 31
 - 32
 - 33
 - 34
 - 35
 - 36
 - 37
 - 38
 - 39
 - 40
 - 41
 - 42
 - 43
 - 44
 - 45
 - 46
 
                        BOOLEAN
KiCheckForAtlThunk (
    IN PEXCEPTION_RECORD ExceptionRecord,
    IN PCONTEXT Context
    )
/*++
Routine Description:
    This routine will determine whether an access violation was raised due to
    an attempt to execute an ATL thunk in a no-execute, non-stack area.
    If so, the thunk will be emulated and execution resumed.
Arguments:
    ExceptionRecord - Supplies a pointer to an exception record.
    Context - Supplies a pointer to a context frame.
Return Value:
    TRUE - Context was updated to reflect the emulated ATL thunk, resume
           execution.
    FALSE - Not an ATL thunk, continue raising the exception.
--*/
//.........
//KiDispatchException:
//......
 switch (ExceptionRecord->ExceptionCode) {
        case STATUS_BREAKPOINT:
            ContextFrame.Eip--;
            break;
        case KI_EXCEPTION_ACCESS_VIOLATION:
            ExceptionRecord->ExceptionCode = STATUS_ACCESS_VIOLATION;
            if (PreviousMode == UserMode) {
                if (KiCheckForAtlThunk(ExceptionRecord,&ContextFrame) != FALSE) {
                    goto Handled1;
                }
//................
                                     
        
            Объявление KiCheckForAtlThunk (втыкать в комменты и название =)) ) Для тех кто в танке: исходники Windows, оконные классы ATL выделяют тупо в хипе кусок-переходник, который заменяет HWND, идущий первым параметром в оконную процедуру, на естественный, объектно-ориентированный this. Так вот, если у нас установлено где-то в реестре юзать защиту от выполнения данных, то, естественно,  в хипе хер чего выполнишь, и возникнет #GP, и тут-то нам и придет на помощь KiCheckForAtlThunk =) Короче, ИМХО, вносить изменения в ядро, для того, чтобы нормально работала криво написанная юзермодная библиотека -- та еще жесть =) Все кто минусует -- не шарят :P
        
        
            
 ISith,
            30 Января 2010
        
        
        
        
        
        
        
                +135.9        
        
                            - 01
 - 02
 - 03
 - 04
 - 05
 - 06
 - 07
 - 08
 - 09
 - 10
 - 11
 - 12
 - 13
 - 14
 - 15
 - 16
 - 17
 
                        public class PlayerWindow
{
    private readonly ScheduleManager _scheduleManager = new ScheduleManager();
...
    private void OpenSchedule(string timesheetFilename)
    {
        if (!_scheduleManager.OpenSchedule(timesheetFilename))
        {
            _isOpen = false;
            return;
        }
        _isOpen = false;
    }
}
                                     
        
            Собственное творчество.  ^_^
        
        
            
 spbAngel,
            29 Января 2010
        
        
        
        
        
        
        
                +109.8        
        
                            - 1
 - 2
 - 3
 - 4
 - 5
 - 6
 - 7
 
                        for i := 1 to X do begin
  tblitem.FindKey([tbltranitemno.text]);
  tblitem.GotoKey;
  button3.Click;
  edit3.Text := floattostr(org-i);
  x := 1-1;
end;
                                     
        
            (c) India
хочется взять и уеб...
        
        
            
 dmtr76,
            29 Января 2010
        
        
        
        
        
        
        
                +64.9        
        
                            - 1
 - 2
 - 3
 
                        // ...
private Blob lClob; //файл
// ...
                                     
        
            
        
        
            
 nxx,
            29 Января 2010