вторник, 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>

четверг, 12 августа 2010 г.

Xmarks in Firefox: Can't sync tabs!

Tab sync is generally reliable, but there a couple of gotchas that can cause problems when you're first getting started.

Can't see your tabs?

If you have enabled tab sync in a browser but can't see your tabs in the Open Tabs window, the most likely culprit is your having earlier copied your Firefox profile from one computer to another. Xmarks relies on a unique identifier stored in your FIrefox profile to know which tabs are on which computer, and if those identifiers aren't actually unique, tab data from one computer will overwrite tab data from another. Further, if you have two browsers with the same id, you might not see any data at all because a browser never shows its own tab data.

The fix for this problem is simple: go to the browser whose data you wish to unhide and reset its identifier. Xmarks will automatically create a new one for you. Do this one time only:

  1. Enter about:config in the Firefox address bar.
  2. Find the item extensions.xmarks.machineId.
  3. Right-click (control-click on the Mac) and select reset.

The next time you sync, your tabs should also be synced and be visible elsewhere.