Difference between revisions of "Sand Box/ru"

From Free Pascal wiki
Jump to navigationJump to search
Line 1: Line 1:
 
{{Sand Box}}
 
{{Sand Box}}
  
=Heading=
+
=Заголовок=
 
----
 
----
==Append==
+
==Подзаголовок==
  
 
<syntaxhighlight> Program Test;
 
<syntaxhighlight> Program Test;
Line 17: Line 17:
 
--[[User:Ggeldenhuys|Graeme]] 11:03, 23 March 2012 (UTC) The DELPHI style doesn't seem to be supported, so we have to use the SOURCE tag instead.
 
--[[User:Ggeldenhuys|Graeme]] 11:03, 23 March 2012 (UTC) The DELPHI style doesn't seem to be supported, so we have to use the SOURCE tag instead.
  
===Sayonara===
+
===Ссылки внутри статьи===
  
Test O
+
Как использовать внутреннюю ссылку: [[#Отступ первой строки|Отступ первой строки]].
  
How to use an internal link: [[#indenting first line|indent first line]].
+
==Внешняя ссылка==
  
==External link==
+
Внешняя ссылка: [http://www.example.com Название ссылки]
External link: [http://www.example.com link title]
+
<br>Ещё одна ссылка: [http://www.example.com Название ссылки]
<br>another link: [http://www.example.com link title]
 
  
<div class="floatright"> [[Image:Laz de menu bearb2.jpg]] </div>
+
<div class="floatright"> [[Image:Laz de menu bears.jpg]] </div>
  
 
+
==Изображение==
 
 
==a image==
 
 
This text should be placed near the picture, does it? zxvzxcv zxvc xcv xzcv zxcv zxvc zxvc zxcv zxcv zxcv zxcv xcv xcv xcv xcv zxcv zxcv zxcv xcv zxcv zxcv aaaaaaaaaaaaa<br>
 
This text should be placed near the picture, does it? zxvzxcv zxvc xcv xzcv zxcv zxvc zxvc zxcv zxcv zxcv zxcv xcv xcv xcv xcv zxcv zxcv zxcv xcv zxcv zxcv aaaaaaaaaaaaa<br>
 
<b>And this line were is going?</b>  and this line?<br>
 
<b>And this line were is going?</b>  and this line?<br>
==a text==
+
==Текст==
This is the text
+
Это текст
  
==new section test==
+
==Новая секция==
  
==Table 2==
+
==Таблица 2==
 
<TABLE WIDTH="90%" CELLPADDING="1" CELLSPACING="1">
 
<TABLE WIDTH="90%" CELLPADDING="1" CELLSPACING="1">
 
<TR>  
 
<TR>  
   <TD><b>Header 1</b></TD>  
+
   <TD><b>Заголовок 1</b></TD>  
   <TD><b>Header 2</b></TD>  
+
   <TD><b>Заголовок 2</b></TD>  
   <TD><b>Header 3</b></TD>  
+
   <TD><b>Заголовок 3</b></TD>  
   <TD><b>Header 4</b></TD>  
+
   <TD><b>Заголовок 4</b></TD>  
 
</TR>  
 
</TR>  
 
<TR>  
 
<TR>  
   <TD>Item 1,1</TD>  
+
   <TD>Элемент 1,1</TD>  
   <TD>Item 1,2</TD>  
+
   <TD>Элемент 1,2</TD>  
   <TD>Item 1,3</TD>  
+
   <TD>Элемент 1,3</TD>  
   <TD>Item 1,4</TD>  
+
   <TD>Элемент 1,4</TD>  
 
</TR>
 
</TR>
 
<TR>  
 
<TR>  
   <TD>Item 2,1</TD>  
+
   <TD>Элемент 2,1</TD>  
   <TD>Item 2,2</TD>  
+
   <TD>Элемент 2,2</TD>  
   <TD>Item 2,3</TD>  
+
   <TD>Элемент 2,3</TD>  
   <TD>Item 2,4</TD>  
+
   <TD>Элемент 2,4</TD>  
 
</TR>  
 
</TR>  
 
</TABLE>
 
</TABLE>
  
==Bullets==
+
==Маркированный список==
*One
+
*Один
*Two
+
*Два
**Tree
+
**Три
  
==Numbering==
+
==Нумерованный список==
#First
+
#Первый
#Second
+
#Второй
#Third
+
#Третий
''Nested Numbering''
+
''Вложенная нумерация''
#First
+
#Первый
##first.one
+
##Первый.Один
##first.two
+
##Первый.Два
##first.three
+
##Первый.Три
#Second
+
#Второй
##second.one
+
##Второй.Один
##second.two
+
##Второй.Два
##second.three
+
##Второй.Три
''Mixed Numbering''
+
''Смешанная нумерация''
#First
+
#Первый
#*first.one
+
#*Первый.Один
#*first.two
+
#*Первый.Два
#*first.three
+
#*Первый.Три
#Second
+
#Второй
#*second.one
+
#*Второй.Один
#*second.two
+
#*Второй.Два
#*second.three
+
#*Второй.Три
  
==indenting first line==
+
==Отступ первой строки==
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Please note that all contributions to Lazarus-ccr are considered to be released under the GNU Free Documentation License (see Lazarus-ccr:Copyrights for details). If you don't want your writing to be edited mercilessly and redistributed at will, then don't submit it here.
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Please note that all contributions to Lazarus-ccr are considered to be released under the GNU Free Documentation License (see Lazarus-ccr:Copyrights for details). If you don't want your writing to be edited mercilessly and redistributed at will, then don't submit it here.
 
: You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION!
 
: You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION!
  
TEST
+
ТЕСТ
  
 
[[es:Probando]]
 
[[es:Probando]]
Line 133: Line 130:
 
This is a test to see, if I can edit a page after the Bad-Behavior update. [[User:Vincent|fpcfan]] 22:43, 7 December 2007 (CET)
 
This is a test to see, if I can edit a page after the Bad-Behavior update. [[User:Vincent|fpcfan]] 22:43, 7 December 2007 (CET)
  
==Tutorial links==
+
==Ссылки на туториалы==
 
[http://www.chat11.com/30_Second_Quick_Wiki_Tutorial 30 Second Quick Wiki Tutorial]
 
[http://www.chat11.com/30_Second_Quick_Wiki_Tutorial 30 Second Quick Wiki Tutorial]
  

Revision as of 12:56, 7 December 2014

Deutsch (de) English (en) español (es) Bahasa Indonesia (id) italiano (it) 日本語 (ja) polski (pl) русский (ru) slovenčina (sk) 中文(中国大陆)‎ (zh_CN)

Заголовок


Подзаголовок

 Program Test;
 Uses Crt;

 Var I : Integer;

 Begin
   For I := 0 to 12 do
     WriteLn('Test ',I:2);
 End.

--Graeme 11:03, 23 March 2012 (UTC) The DELPHI style doesn't seem to be supported, so we have to use the SOURCE tag instead.

Ссылки внутри статьи

Как использовать внутреннюю ссылку: Отступ первой строки.

Внешняя ссылка

Внешняя ссылка: Название ссылки
Ещё одна ссылка: Название ссылки

Изображение

This text should be placed near the picture, does it? zxvzxcv zxvc xcv xzcv zxcv zxvc zxvc zxcv zxcv zxcv zxcv xcv xcv xcv xcv zxcv zxcv zxcv xcv zxcv zxcv aaaaaaaaaaaaa
And this line were is going? and this line?

Текст

Это текст

Новая секция

Таблица 2

Заголовок 1 Заголовок 2 Заголовок 3 Заголовок 4
Элемент 1,1 Элемент 1,2 Элемент 1,3 Элемент 1,4
Элемент 2,1 Элемент 2,2 Элемент 2,3 Элемент 2,4

Маркированный список

  • Один
  • Два
    • Три

Нумерованный список

  1. Первый
  2. Второй
  3. Третий

Вложенная нумерация

  1. Первый
    1. Первый.Один
    2. Первый.Два
    3. Первый.Три
  2. Второй
    1. Второй.Один
    2. Второй.Два
    3. Второй.Три

Смешанная нумерация

  1. Первый
    • Первый.Один
    • Первый.Два
    • Первый.Три
  2. Второй
    • Второй.Один
    • Второй.Два
    • Второй.Три

Отступ первой строки

      Please note that all contributions to Lazarus-ccr are considered to be released under the GNU Free Documentation License (see Lazarus-ccr:Copyrights for details). If you don't want your writing to be edited mercilessly and redistributed at will, then don't submit it here.

You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION!

ТЕСТ

es:Probando

Another Test: lets go crazy

I want to create a boxed text:

This is in a box, or so I hope.

This is outside the box, no? And this is a reference to my incomplete Structural Analyis book ThisIsMyShura

Weird: this is in the box as well?
  • And a bullet in italics?

non formatted...

Humm

Float Like A Butterfly

New section?

Let's see... ok

grusskarte

if Graphviz was installed, this would draw a pretty graph...

<graphviz> digraph G {

 rankdir=LR; node [fontsize = "8" shape = "rectangle"]; 
 "Node 1" -> "Node 2";

} </graphviz>

This is a test to see, if I can edit a page after the Bad-Behavior update. fpcfan 22:43, 7 December 2007 (CET)

Ссылки на туториалы

30 Second Quick Wiki Tutorial

Use this syntax to include a page within another page: {{:LazAutoUpdater}} Deutsch (de) English (en) español (es) Bahasa Indonesia (id) italiano (it) 日本語 (ja) polski (pl) русский (ru) slovenčina (sk) 中文(中国大陆)‎ (zh_CN)

Test whether an Application is already running

Here's a unit that works under both Windows and Linux

  • There's no need to pass the full application path to the function - the ExeName will usually do. Below code cannot find out its own exename though.
unit uappisrunning;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils
  {$IFDEF WINDOWS}, Windows, JwaTlHelp32{$ENDIF}
  {$IFDEF LINUX},process{$ENDIF};
// JwaTlHelp32 is in fpc\packages\winunits-jedi\src\jwatlhelp32.pas

// Returns TRUE if EXEName is running under Windows or Linux
// Don't pass an .exe extension to Linux!
function AppIsRunning(const ExeName: string):Boolean;

implementation

// These functions return Zero if app is NOT running
// Override them if you have a better implementation

{$IFDEF WINDOWS}
function WindowsAppIsRunning(const ExeName: string): integer;
var
  ContinueLoop: BOOL;
  FSnapshotHandle: THandle;
  FProcessEntry32: TProcessEntry32;

begin
  FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
  FProcessEntry32.dwSize := SizeOf(FProcessEntry32);
  ContinueLoop := Process32First(FSnapshotHandle, FProcessEntry32);
  Result := 0;

  while integer(ContinueLoop) <> 0 do
    begin
    if ((UpperCase(ExtractFileName(FProcessEntry32.szExeFile)) =
      UpperCase(ExeName)) or (UpperCase(FProcessEntry32.szExeFile) =
      UpperCase(ExeName))) then
      begin
      Inc(Result);
      // SendMessage(Exit-Message) possible?
      end;
    ContinueLoop := Process32Next(FSnapshotHandle, FProcessEntry32);
    end;

  CloseHandle(FSnapshotHandle);
end;
{$ENDIF}

{$IFDEF LINUX}
function LinuxAppIsRunning(const ExeName: string): integer;
var
  t: TProcess;
  s: TStringList;

begin
  Result := 0;
  t := tprocess.Create(nil);
  t.CommandLine := 'ps -C ' + ExeName;
  t.Options := [poUsePipes, poWaitonexit];

    try
    t.Execute;
    s := TStringList.Create;
      try
      s.LoadFromStream(t.Output);
      Result := Pos(ExeName, s.Text);
      finally
      s.Free;
      end;
    finally
    t.Free;
    end;

end;
{$ENDIF}

function AppIsRunning(const ExeName: string):Boolean;
begin

{$IFDEF WINDOWS}
  Result:=(WindowsAppIsRunning(ExeName) > 0);
{$ENDIF}

{$IFDEF LINUX}
  Result:=(LinuxAppIsRunning(ExeName) > 0);
{$ENDIF}

end;
end.

See also