viator@nya:~/bin$ cat openpdf
#!/bin/sh
# autoconvert with libreoffice / openoffice
# config
writer=lowriter
# or
#writer=oowriter
format=pdf
reader=evince
source_file="$*"
out_file=${source_file%.*}.$format
$writer --convert-to $format $source_file
$reader $out_file
# vi: ts=2 sw=2
ru.wikipedia.org Для возобновления надо снова нажать Scroll Lock
В консоли при нажатии Scroll Lock приостанавливается вывод на экран {
public function AlwaysNull()
{
throw new Error("This class cannot be instantiated");
}
}
public boolean isOdd(int n) {
return ((n & 1) == 1);
}
Например закачать директорию с фотографиями в Picasa теперь можно так:
$ google picasa create --title "My album" ~/Photos/vacation/*.jpg
Ещё примеры использования:
$ google blogger post --blog "My blog" --tags "python, googlecl, development" my_post.html
$ google calendar add "Lunch with Jason tomorrow at noon"
$ google docs edit --title "Shopping list" --editor vim
renice +4 `pgrep opera`
man pkill
TextFormat.indent работает в пределах параграфа — для кусков текста, разделенных new line. То есть, если бы юзер вводил текст, не нажимая перевод строки, то было бы то, что надо. Но каждый перевод строки дает новую строку с отступом, а это мне не нужно. Нужен отступ только в первой строке.
Трюк в том, чтобы применять разные TextFormat к разным частям текста. После некоторых экспериментов найден такой не очевидный вариант:
private var tf : TextField = new TextField();
private var formatIndent : TextFormat = new TextFormat();
private var formatNoIndent : TextFormat = new TextFormat();
private function Init() : void
{
formatIndent.indent = 40;
formatNoIndent.indent = 0;
tf = new TextField;
tf.width = 100;
tf.border = true;
tf.autoSize = TextFieldAutoSize.LEFT;
tf.multiline = true;
tf.type = TextFieldType.INPUT;
tf.wordWrap = true;
tf.addEventListener(Event.CHANGE, Update);
holder.rawChildren.addChild(tf);
Update();
}
private function Update(ev:Event = null):void
{
if(tf.text.length == 0)
{
tf.defaultTextFormat = formatIndent;
}
else
{
tf.defaultTextFormat = formatNoIndent;
tf.setTextFormat(formatIndent, 0, 1);
}
}