Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
.b-suggest{position:relative;margin:1px 4.85em 0 0}.b-suggest-popup{position:absolute;width:100%}.b-suggest__opera-gap{position:absolute;height:25em;border:1px solid transparent}.b-suggest-list{position:absolute;z-index:9999;overflow:hidden;min-width:25em;max-width:100%;margin-top:-4px;border-collapse:separate;-webkit-box-shadow:0 1px 7px #9a9a9a;-moz-box-shadow:0 1px 7px #9a9a9a;box-shadow:0 1px 7px #9a9a9a;border:1px solid #dedede;border-color:rgba(154,154,154,0.5);border-top-color:rgba(154,154,154,0.4)
use List::Util qw/first/;
print "This is ".(first {1} qw /wow bad foo bar bad/)."!\n"
alert('Проверка, раз, два, три');
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type') ?>; charset=<?php bloginfo('charset') ?>" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<title><?php wp_title( '|', true, 'right' ); bloginfo( 'name' ); ?></title>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url') ?>" type="text/css" media="screen" />
#в баше
echo "Тут подсвечивает"
echo 'А тут нет'
@synthesize UID = _UID;
@synthesize type = _type;
- (void)dealloc
{
[_UID release];
[_type release];
[super dealloc];
}
var teamMembers = new List<string> {
"Lou Loomis",
"Smoke Porterhouse",
"Danny Noonan",
"Ty Webb"
};
FindByFirstName( teamMembers, "Danny", (x, y) => x.Contains(y) );
(setq xmin (* 250 (fix (/ x 250))))
(setq xmax (+ xmin 250))
(setq ymin (* 250 (fix (/ y 250))))
(setq ymax (+ ymin 250))
package main
import "fmt" // Implements formatted I/O.
/* Print something */
func main() {
fmt.Printf("Hello, world \n")
}
parse = fst . process (Node 100500 M.empty []) . split
where
process parent@(Node name mp children) (tag:tags)
| head tag == '/' = (parent, tags)
| last tag == '/' = let ident = hash $ init tag
child = Node ident (M.singleton ident 1) []
newMap = M.insertWith' (+) ident 1 mp
in process (Node name newMap (child:children)) tags
| otherwise = let ident = hash tag
(child@(Node _ cmap _), rest) = process (Node ident (M.singleton ident 1) []) tags
newMap = M.unionWith (+) mp cmap
in process (Node name newMap (child:children)) rest
process parent [] = (parent, [])
answer tree query = process tree $ map hash $ words query
where
process (Node _ mp _) [last] = M.findWithDefault 0 last mp
process (Node name _ children) all@(tag:tags) =
let tail = if name == tag then tags else all
in foldl' (\acc child -> acc + process child tail) 0 children

<?php
$4test = 123; // неверно; начинается с цифры
$_4test = 123; // верно; начинается с символа подчеркивания
$tyдte = 123; // верно; 'д' это (Дополнительный) ASCII 228.
?>
<head>
<title>Тест вложенного синтаксиса</title>
<script type="text/javascript">
$(document).ready(function(){
alert("ой ой");
});
</script>
</head>
class Talker {
use A, B {
B::smallTalk insteadof A;
A::bigTalk insteadof B;
}
}
Sub DeleteEmptyObj()
Dim Elem As Object
Dim entry As AcadEntity
Dim MyTxt As AcadText
For Each Elem In ThisDrawing.ModelSpace
If Elem.EntityName = "AcDbText" Then
Set MyTxt = Elem
Set entry = Elem
If Trim(MyTxt.textString) = "" Then
entry.Delete
purge_a = purge_a + 1
End If
'End If
ElseIf Elem.EntityName = "AcDbLine" Or Elem.EntityName = "AcDbPolyline" Then
Set entry = Elem
If entry.Length = 0 Then
entry.Delete
purge_a = purge_a + 1
End If
End If
Next
End Sub
<code> в любом инспекторе, то будет видно, что к нему добавился класс «vbscript».class Foo : public Bar
{
public:
Foo(int n) { _n = n; }
~Foo() {}
int getN() const { return _n; }
void setN(int n) { _n = n; }
private:
int _n;
}
// file Foo.h
@interface Foo : NSObject
{
int _n;
}
@property (nonatomic, assign) n;
-(id)initWithN: (int)n;
@end
// file Foo.m
#import "Foo.h"
@implementation Foo
@synthesize n=_n;
-(id)initWithN: (int)n
{
self.n = n;
}
- (id)initWithN:(int)n;
+ (id)instanceWithObject:(NSObject *)object;
01 PRINT "Hello, Habr. Devide me completely!"
02 INPUT A
03 INPUT B
05 IF B = 0 GOTO 07
06 IF B <> 0 GOTO 09
07 PRINT "Nice try, Sauron ;-)"
08 GOTO 02
09 PRINT A/B
10 END

-module(sensors_pool).
-export([start_link/0, stop/0, start_pool/3,
run/2, sync_queue/2, async_queue/2, stop_pool/1]).
start_link() ->
sensors_sup:start_link().
stop() ->
ppool_supersup:stop().
Впервые за 2 года, а может, и более, Хабр повёл себя неестественным образом.
&НаКлиенте
Процедура ВывестиСообщение(Команда)
Если ВариантВыводаСообщения = "Сообщение" Тогда
Сообщить("Hello, World !!!");
ИначеЕсли ВариантВыводаСообщения = "Предупреждение" Тогда
Предупреждение("Hello, World !!!");
ИначеЕсли ВариантВыводаСообщения = "Оповещение" Тогда
ПоказатьОповещениеПользователя("Hello, World !!!");
КонецЕсли;
КонецПроцедуры
void selectRecordExamples()
{
CustTable custTable;
;
// A customer is found and returned in custTable
select * from custTable;
// A customer with account number > "100" is found
select * from custTable
where custTable.AccountNum > "100";
// Customer with the lowest account number > "100" found:
// Coho Winery with number 200.
select * from custTable order by accountNum
where custTable.AccountNum > "100";
// The next customer is read (Coho Vineyard & Winery)
next custTable;
// Customer with higest account number
// (greater than 100) found: Fourth Coffee
select * from custTable order by accountNum desc
where custTable.accountNum > "100";
// The next record is read (DESC): Fabrikam, Inc.
next custTable;
// Customer with highest account number found: Fourth Coffee
select reverse custTable order by accountNum;
// Customer with "lowest" name and account number
// in the interval 100 to 1000 is found. This is Coho Winery.
select * from custTable order by name
where custTable.accountNum > "100"
&& custTable.accountNum < "1000";
// The count select returns the number of customer
// account numbers (5)
select count(AccountNum) from custTable;
// Prints the result of the count
print custTable.accountNum;
// Returns the sum of balances for non-blocked customers.
// The result is: SUM: $1,060,000, stored in the Balance
// field
select sum(balance) from custTable
where custTable.blocked == DebCreBlocked::No;
}
<hh user=PersistenceContext>
private EntityManager em;
Появился инструмент ввода тегов Source