2012-01-28

HTML5-XML: innerHTML problemo

La problemo estas simpla, sed la solvon mi ankoraŭ ne konas. Mi havas du dosieron, unu el ili estas HTML5-a (prueba.html) kaj la alia estas HTML5-XML-a (prueba.xhtml), ankaŭ konata kiel xHTML5 (kvankam ĝi ne apartenas al la bonreputacia sinsekvo XHTML). Ambaŭ enhavas precize la saman informon: The problem is simple, but I still cannot find its solution. I have two files, one of them is written in HTML5 (prueba.html) and the otherone is written in HTML5-XML (prueba.xhtml), also known as xHTML5 (even when it does not belong to the well reputed XHTML series). Both of them contain exactly the same information:

prueba.html

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <title>El titulo</title>
  <script id="plantilla" type="text/html">
    <h1>{{titulo}}</h1>
    <h2>{{subtitulo}}</h2>
  </script>
</head>
<body>
  <header id="cabecera">
    <h1>titulo original</h1>
    <h2>subtitulo original</h2>
  </header>
</body>
</html>

prueba.xhtml

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
  <meta charset="utf-8" />
  <title>El titulo</title>
  <script id="plantilla" type="text/xhtml+xml">
    <h1>{{titulo}}</h1>
    <h2>{{subtitulo}}</h2>
  </script>
</head>
<body>
  <header id="cabecera">
    <h1>titulo original</h1>
    <h2>subtitulo original</h2>
  </header>
</body>
</html>
Kiam mi skribas la sekvantajn ordonojn en la "linio de ordonoj de javascript" je la ttt-legilo Opera 11.61 When I write the following commands in the "javascript command line" in the web browser Opera 11.61
>>> document.getElementById('cabecera').innerHTML
"
    <h1>titulo original</h1>
    <h2>subtitulo original</h2>
  "
>>> document.getElementById('plantilla').innerHTML
"
    <h1>{{titulo}}</h1>
    <h2>{{subtitulo}}</h2>
  "
>>>
mi obtenas la samajn rezultojn por la dosiero prueba.html kaj prueba.xhtml. I obtain the same results for both files prueba.html and prueba.xhtml.
Nun, kiam mi skribas la samajn ordonojn en la "linio de ordonoj de javascript" je la ttt-legilo Fajrovulpo 9.0.1, mi obtenas la sekvantajn rezultojn por prueba.html Now, when I write the same commands in the "javascript command line" in the web browser Firefox 9.0.1, I get the following results for prueba.html
> document.getElementById('cabecera').innerHTML
"\n    <h1>titulo original</h1>\n    <h2>subtitulo original</h2>\n  "

> document.getElementById('plantilla').innerHTML
"\n    <h1>{{titulo}}</h1>\n    <h2>{{subtitulo}}</h2>\n  "
kaj la sekvantajn rezultojn por prueba.xhtml and the following results for prueba.xhtml
> document.getElementById('cabecera').innerHTML
"\n    <h1 xmlns=\"http://www.w3.org/1999/xhtml\">titulo original</h1>\n    <h2 xmlns=\"http://www.w3.org/1999/xhtml\">subtitulo original</h2>\n  "

> document.getElementById('plantilla').innerHTML
"\n    \n    \n  "
Ambaŭ dosieroj, prueba.html kaj prueba.xhtml, estis validataj per validator.nu, do, kie estas la eraro? ĉu je la ttt-legilo? kiu el la du legiloj funkcias korekte? Both files, prueba.html and prueba.xhtml, were validated by.validator.nu, so, where is the error? is it in the web browser? which of the two browsers is working properly?

Referencoj

  1. element.innerHTML. Mozilla developer network. Legita je la 28-a de januaro de 2012.
  2. innerHTML por HTML. W3C.
  3. innerHTML por HTML-XML. W3C.

2011-12-31

x48: Imitilo por HP48GX

Celo

Instali la imitilo x48 por HP48GX sur Kubuntu

Bezonaĵoj

Ĉiuj versioj
Kubuntu 11.10
  • la pakaĵo xfonts-100dpixfonts-75dpi

Ordonoj

Kubuntu 11.10

Instalu la pakaĵon xfonts-100dpixfonts-75dpi.

Ĉiuj versioj

Instalu la pakaĵon x48_x.x.x_xxxx.deb.

Nun, por instali la ROM-on, eniru la dosierujon kiu enhavas la ROM-on kaj tajpu

$ x48 -initialize -rom gxrom-r

ĉi tiu instalas la ROM-on en ~/.hp48/rom kaj malfermas la imitilon x48.

Referencoj

  1. Imitilo x48: forumo

x48: Problemoj kun tiparoj

Problemo

Poste la instalado de la imitilo x48 kaj la instalado de sian ROM-on, vi tajpas la ordonon

$ x48

kaj la sekvantan mesaĝon aperas

x48: using XShm extension.
x48: FATAL ERROR, exit.
- can't load font '-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-iso8859-1'
- Please change resource 'connectionFont'

Bezonaĵoj

  • la pakaĵo xfonts-100dpixfonts-75dpi

Solvo

Se vi volas, vi povas konstati se vi havas iun fonton tiel kiel '-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-iso8859-1', pere unu el la du sekvantaj ordonoj

$ xlsfonts | grep helvetica

$ xfontsel
Nun, se vi ne havas iun helvetica-n tiparon, simple instalu la pakaĵon xfonts-100dpixfonts-75dpi.

Referoncoj

  1. Emulator x48: forumo
  2. archlinux: forumo

2011-12-22

Kermit kaj HP48

Celo

Transdono de datumoj inter komputilo kaj kalkulilo HP48GX per kermit.

Bezonaĵoj

  • la pakaĵon ckermit

Ordonaro

Konektu la HP48-n al la komputilo. Vidu dmesg por scii la komunikhavenon (/dev/ttyUSB0 estos uzata kiel ekzemplo).

Eniru la programon kermit.

$ kermit

Poste tajpu la sekvantajn komandojn por agordi la Kermit-n (agordebla ankaŭ ĉe ~/.kermrc):

set modem type none
set line /dev/ttyUSB0
set speed 9600
set carrier-watch off
set flow-control none
set parity none
set block-check 3
set control-character prefixed all
set file type binary

Por el/alŝuti dosierojn:

send dosiernomo  ; sendi dosiero(j)n al la HP48
get dosiernomo   ; ricevi dosiero(j)n el la HP48

Referencoj

  1. The kermit project

USB-Serial adaptilo

Celo

Scii se iu USB-Serial adaptilo

Ordonoj

$ dmesg
[ 8512.096073] usb 3-1: new full speed USB device number 2 using uhci_hcd
[ 8514.395914] usbcore: registered new interface driver usbserial
[ 8514.395930] USB Serial support registered for generic
[ 8514.395978] usbcore: registered new interface driver usbserial_generic
[ 8514.395981] usbserial: USB Serial Driver core
[ 8514.424751] USB Serial support registered for pl2303
[ 8514.424801] pl2303 3-1:1.0: pl2303 converter detected
[ 8514.436237] usb 3-1: pl2303 converter now attached to ttyUSB0
[ 8514.436262] usbcore: registered new interface driver pl2303
[ 8514.436264] pl2303: Prolific PL2303 USB to serial adaptor driver
$ lsusb
Bus 003 Device 002: ID 0557:2008 ATEN International Co., Ltd UC-232A Serial Port [pl2303]

2011-05-02

iBus kaj biblioteko m17n en Kubuntu

⋄ Kubuntu versio 11.04 kaj 10.10

  1. Instalu la pakaĵojn: ibus, ibus-qt4, ibus-gtk, ibus-m17n

  2. Tajpu: $ im-switch -s ibus

  3. Tajpu: $ ibus-setup

  4. Ĉe General klaku sur Show icon on system tray

  5. Ĉe Input method selektu iun enigmetodon kaj poste klaku Add

Mi kore dankas al mang0 is still raw… pro ĉi tiu utila informo.

Problemoj konataj de ĉi tiu instalado

Se vi kutime uzas enigmetodon kiu uzas dead keys, ekzemple la hispana, ĝi ne funkcios en programojn bazitaj zur Gtk. Ebla solvo al ĉi tiu problemo estas aldoni la enigmetodon latin-prelatin-post en iBus por tajpi ekzemple "canción".

2010-04-16

Instali bibliotekon m17n por SCIM/SKIM sur Kubuntu

Ĉi tiu instalado zorgas pri la instalado de la bibliotekon m17n por SKIM, sed ne pri la instalado de la enigmetodon SKIM aŭ SCIM. Se vi volas instali SKIM-on sur Kubuntu, bonvolu vidu la ligilon.

⋄ Kubuntu versio 9.10

Por instali la bibliotekon m17n, nur instalu la pakaĵojn: