среда, 15 июня 2011 г.

Ubuntu on Acer R3700 nettop can't shutdown/reboot

Seems like at least one module needs to be disabled from config.

lsmod | grep rt

Find out if there exists rt2800pci .

sudo modprobe -rf rt2800pci
echo blacklist rt2800pci | sudo tee -a /etc/modprobe.d/blacklist.conf

Tested on XFCE 11.04

вторник, 14 июня 2011 г.

Metrologic установка под Windows

Для установки USB POS (эмуляция COM-порта) драйвера с uni-directional на ОС Windows7 необходимо:

1. Загрузить и разархивировать драйвер (с сайта производителя : https://www.honeywellaidc.com/en-GB/Pages/Product.aspx?category=Laser&cat=HSM&pid=9520/40),
2. Считать сканером соответствующий программирующий штрих-код (uni-directional).
3. Открыть "Диспетчер устройств" и в разделе "Порты COM и LPT" выбрать появившийся COM-порт, помеченный восклицательным знаком в желтом кружке.
4. Правой кнопкой мыши открыть контекстное меню - "Свойства" -> "Обновить драйвер" и указать папку загруженного и разархивированного ранее драйвера.
5. Установить драйвер.

Примечание: драйвер работает только с 32-битной версией ОС, 64-битная пока не поддерживается.

Windows 7 Home: disable password expiration

Use the following command to disable expiration policy on Windows 7 Home editions:
net accounts /maxpwage:unlimited



суббота, 4 июня 2011 г.

UBUNTU: change hostname

To view current hostname:
sysctl kernel.hostname

To change it:
 sysctl kernel.hostname=NewHostname
Or better edit /etc/hostname

Also don't forget to edit /etc/hosts to prevent sudo showing stupid "unable to resolve" error.

воскресенье, 3 октября 2010 г.

XSL: node-sets. Get value from variable


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
extension-element-prefixes="exsl"
>
<xsl:output method="xml" omit-xml-declaration="yes" />

<xsl:template match="/">
<xsl:variable name="author-id" ><xsl:value-of select="data/get-advice-last/entry/author/item/@id" /></xsl:variable>
<xsl:variable name="author" ><xsl:copy-of select="data/advice-author/entry[@id=$author-id]" /></xsl:variable>
<div class="h"><h1>Советы</h1><h3>диетолога</h3></div>
<div style="margin-bottom:5px;font-weight:bold;"><xsl:value-of select="data/get-advice-last/entry/title" /></div>

<div style="font-size:.9em;"><img style="float:left;border:1px solid #3D93E5;margin:1px 10px 10px 0px;" src="{$root}/image/2/80/100/5{exsl:node-set($author)/entry/photo/@path}/{exsl:node-set($author)/entry/photo/filename}" />
Рассказывает <xsl:value-of select="exsl:node-set($author)/entry/fio" />,
<xsl:value-of select="exsl:node-set($author)/entry/description" />
</div>
<div><a href="{$root}/advice/{data/get-advice-last/entry/@id}">Читать дальше...</a></div>
</xsl:template>

</xsl:stylesheet>