update-alternatives --install /usr/bin/x-www-browser x-www-browser /opt/firefox/firefox 100 update-alternatives --config x-www-browser xdg-mime, xdg-open
original post http://vasnake.blogspot.com/2013/06/iceweasel.html
Записки программиста, обо всем и ни о чем. Но, наверное, больше профессионального.
update-alternatives --install /usr/bin/x-www-browser x-www-browser /opt/firefox/firefox 100 update-alternatives --config x-www-browser xdg-mime, xdg-open
Posted by
Valentin
at
16:47
0
comments
Labels: linux, web-browser
Posted by
Valentin
at
17:28
0
comments
Labels: opensource
element.style {
background-image: url(/static/search.png);
background-position: 0% 0%;
background-repeat: repeat repeat;
}
|
Posted by
Valentin
at
16:42
0
comments
Posted by
Valentin
at
15:53
0
comments
Labels: python, web-develop
locate VBoxCreateUSBNode.sh cp /usr/share/virtualbox/VBoxCreateUSBNode.sh /lib/udev/ nano /etc/udev/rules.d/10-vboxdrv.rules |
grep vbox /etc/group
vboxusers:x:119:
nano /etc/fstab
# 119 is vboxusers
none /proc/bus/usb usbfs devgid=119,devmode=666 0 0
|
Posted by
Valentin
at
18:26
0
comments
Labels: virtbox, windsurfing
Posted by
Valentin
at
16:49
0
comments
Labels: JS, serialization
def parse_declaration(self, i):
"""Fix handling of CDATA sections. Code borrowed from BeautifulSoup.
"""
j = None
if self.rawdata[i:i+9] == '<![CDATA[':
k = self.rawdata.find(']]>', i)
if k == -1:
k = len(self.rawdata)
j = k+3
else:
try:
j = SGMLParser.parse_declaration(self, i)
except SGMLParseError:
j = len(self.rawdata)
return j
|
Posted by
Valentin
at
14:04
0
comments
Labels: JS, Zope(Plone)
Posted by
Valentin
at
02:03
0
comments
Labels: python, Zope(Plone)
Posted by
Valentin
at
17:06
0
comments
Labels: python, web-develop
<img src="http://www.onsite.ru/ftp/vivwater/webcam.jpg" name="webcam">
<script language="JavaScript">
function go()
{
var now = new Date();
var stamp= parseInt(now.getTime() / 1000); document.images.webcam.src="http://www.onsite.ru/ftp/vivwater/webcam.jpg?"+stamp;
setTimeout("go()", 2000);
}
setTimeout("go()", 1000);
</script>
|
<script language="JavaScript">
// <![CDATA[
function go()
{
var now = new Date();
var stamp= parseInt(now.getTime() / 1000); document.images.webcam.src="http://www.onsite.ru/ftp/vivwater/webcam.jpg?"+stamp;
setTimeout("go()", 2000);
}
setTimeout("go()", 1000);
// ]]>
</script>
|
<script language="JavaScript"> // </script> |
Posted by
Valentin
at
16:40
0
comments
Labels: грабли, JS, Zope(Plone)
Posted by
Valentin
at
19:54
0
comments
Labels: windsurfing
Posted by
Valentin
at
18:10
0
comments
Posted by
Valentin
at
02:39
2
comments
Labels: windsurfing
Posted by
Valentin
at
15:49
0
comments
RegNotifyChangeKeyValue
Posted by
Valentin
at
16:56
0
comments
Labels: programming
Posted by
Valentin
at
02:58
0
comments
Labels: video
Posted by
Valentin
at
17:21
0
comments
Labels: todo
import psycopg2
import psycopg2.extensions
psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
psycopg2.extensions.register_type(psycopg2.extensions.UNICODEARRAY)
conn = psycopg2.connect("host=vags101 port=5432 dbname=postgisdb user=mfs password=12345678 connect_timeout=10 client_encoding=utf8")
conn.autocommit = True
cur = conn.cursor()
cur.execute("""
select * from mfsdata.patching limit 1;
""")
for descr in cur.description:
if descr.type_code in GEOMETRY_TYPES:
print 'geometry data'
|
import psycopg2
import psycopg2.extensions
psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
psycopg2.extensions.register_type(psycopg2.extensions.UNICODEARRAY)
conn = psycopg2.connect("host=vags101 port=5432 dbname=postgisdb user=mfs password=12345678 connect_timeout=10 client_encoding=utf8")
conn.autocommit = True
cur = conn.cursor()
cur.execute("""
select * from mfsdata.patching limit 1;
""")
for rec in cur.description:
print "Field name: '%s', field type_code: '%s'" % (rec.name, rec.type_code)
cur.execute("""
SELECT attname, atttypid FROM pg_attribute WHERE attrelid = 'mfsdata.patching'::regclass;
""")
for rec in cur:
print "(Field name, field type_code): '%s'" % (rec,)
cur.execute("""
select pg_type.oid as type_code, pg_type.typname as type_name, pg_attribute.attname as field_name
from pg_type, pg_attribute
where pg_type.oid = pg_attribute.atttypid and pg_attribute.attrelid = 'mfsdata.patching'::regclass;
""")
for rec in cur:
print "(type_code, type name, field name): '%s'" % (rec,)
|
Posted by
Valentin
at
17:56
0
comments