| | | |
|
| Форум Полигон: подсветка кода |
|
|
|
|
1 | #270 | цитата | 03-11-2007 15:14 |
Ассемблер
asm | fld1 // 1 . fdiv a // c . fst st( 1) // c c . fadd a // c+a c . fxch st( 1) // c c+a . fmul x // c*x c+a . fadd y // d c+a . fsub b // d-b a+c . fxch st( 1) fdiv // x1 . fst [x1] fmul a // x1*a fadd b // y1 fstp [y1] |
asm | MOV ECX, [EDX] XCHG ECX, [EAX] MOV [EDX], ECX |
|
|
| |
|
2 | #271 | цитата | 03-11-2007 15:16 |
HTML
html | <HTML><HEAD><TITLE>DeskSoft.ru: Форум - Полигон | подсветка кода</TITLE> <META http-equiv="content-type" content="text/html; charset=windows-1251"> <LINK href="style_klen.css" type="text/css" rel="stylesheet"> <LINK rel="icon" href="favicon.ico" type="image/x-icon"> <LINK rel="shortcut icon" href="favicon.ico" type="image/x-icon"> <sсriрt language="jаvаsсript" src="scrpt.js" type=text/jаvаsсript></sсriрt> <sсriрt language="jаvаsсript" src="date.js" type=text/jаvаsсript></sсriрt> <sсriрt language="jаvаsсript" src="ips_menu.js" type=text/jаvаsсript></sсriрt> |
|
|
| |
|
3 | #272 | цитата | 03-11-2007 15:17 |
PHP
php | function cut_string($text,$maxlength){
if(strlen($text)>$maxlength){ $text=substr($text, 0, ($maxlength-3))."..."; }
return $text; } |
php | function stripslash($text) { if (QUOTES_GPC) $text = stripslashes($text); return $text; } |
php | function dbresult($query, $row) { $result = @mysql_result($query, $row); if (!$result) { echo mysql_error(); return false; } else { return $result; } } |
|
|
| |
|
4 | #273 | цитата | 03-11-2007 15:18 |
MySQL
mysql | SELECT MAX(`имя_поля`)+1 as `next_id` FROM `имя_таблицы` CREATE TABLE `awards` ( `` int(10) unsigned NOT NULL default '0', `awName` varchar(255) NOT NULL default '', -- `awType` varchar(10) NOT NULL default '', `awSmallGraphic` varchar(255) NOT NULL default '', /* `awBigGraphic` varchar(255) NOT NULL default '', `awShortName` varchar(20) NOT NULL default '', `awPoints` int(10) unsigned NOT NULL default '0', */ `awDesсriрtion` varchar(255) NOT NULL default '', `awPoints2` int(10) unsigned NOT NULL default '0', `awPoints3` int(10) unsigned NOT NULL default '0', `awPoints4` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`awId`) ) TYPE=MyISAM; SELECT `category`, `item` FROM `first` AS `a` LEFT JOIN `second` AS `b` USING ( `some_column` ); |
|
|
| |
|
5 | #274 | цитата | 03-11-2007 15:19 |
мдя, php и asm подглючивают |
|
| |
|
6 | #323 | цитата | 11-12-2007 14:03 |
delphi | // Bell filter function BellFilter(Value: Single): Single; begin if (Value < 0.0) then Value := -Value; if (Value < 0.5) then Result := 0.75 - Sqr(Value) else if (Value < 1.5) then begin Value := Value - 1.5; Result := 0.5 * Sqr(Value); end else Result := 0.0; end; |
delphi | procedure TForm1.Button1Click(Sender: TObject); var i,w,h:integer; bt:tbitmap; begin bt:=tbitmap.Create; try bt.Canvas.Font.Name:='Courier New'; bt.canvas.Font.Size:=12; h:=0; w:=0; for i:=32 to 255 do begin if(h<bt.Canvas.TextHeight(char(i))) then h:=bt.Canvas.TextHeight(char(i)); w:=w+bt.Canvas.TextWidth(char(i)); end; bt.Width:=w; bt.Height:=h; w:=0; for i:=32 to 255 do begin bt.Canvas.TextOut( w, h-bt.Canvas.TextHeight(char(i)), char(i)); w:=w+bt.Canvas.TextWidth(char(i)); end; bt.SaveToFile('C:\111.bmp'); finally bt.Free; end; end; |
|
|
| |
|
7 | #353 | цитата | 24-12-2007 19:00 |
какой ужас.. |
|
Прикрепленные файлы: |
| Ножик.rar - (68.97 Kb) Кол-во скачиваний: 1256 |
|
| |
|
8 | #1120 | цитата | 02-03-2009 20:19 |
php | function call_strip_span_bbcomment( $a ){ global $BBCODE_PHP; if(count($a)==4){ $a[2]=preg_replace( "#(\<span(.+?)\>)#is","",$a[2] ); $a[2]=preg_replace( "#(\<\/span\>)#is","",$a[2] ); return "<span style='color:".$BBCODE_PHP['comment'].";'>".$a[2]."</span>".$a[3]; }elseif(count($a)==3){ $a[1]=preg_replace( "#(\<span(.+?)\>)#is","",$a[1] ); $a[1]=preg_replace( "#(\<\/span\>)#is","",$a[1] ); return "<span style='color:".$BBCODE_PHP['comment'].";'>".$a[1]."</span>"; } } |
|
|
| |
| Тему просматривают: 1 гостей, 0 пользователей |
|
| подсветка кода | Ответов: 8 |
|
|
|
|
Мини-чат :) |
|
|
Статистика |
| Сегодня | Всего |
Посетителей | 4397 | 4254294 |
Запросов | 187984 | 397038293 |
Online |
Пользователей | 0 |
Гостей | 488 |
|
|
|