Tools
Записки программиста, обо всем и ни о чем. Но, наверное, больше профессионального.
2013-09-30
Vagrant
Posted by Valentin at 12:30 0 comments
Labels: virtbox
2013-09-27
Закрытие сезона
Posted by Valentin at 12:30 0 comments
Labels: windsurfing
2013-09-26
dijit
define("vs/dijit/agsdir", ['dojo/_base/declare', 'dijit/_WidgetBase', 'dijit/_Templated', 'dojo/_base/array', "dojo/dom-construct", "dijit/_TemplatedMixin", "dijit/layout/ContentPane", "dijit/layout/LayoutContainer", "dijit/form/ValidationTextBox", "dijit/_WidgetsInTemplateMixin", "dojo/text!./templates/agsdir.html" ], function(declare, _WidgetBase, _Templated, array, domConstruct, _TemplatedMixin, ContentPane, LayoutContainer, ValidationTextBox, _WidgetsInTemplateMixin, dirTemplate) { var AGSDIR = declare("vs.dijit.agsdir", [_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], { constructor: function(params, srcNodeRef) { params = params || {}; if (!params.map) { throw new Error('no map defined in params for AGSDIR'); } dojo.mixin(this, params); }, templateString: dirTemplate, baseClass: "layersAGSDir", buildRendering: function() { this.inherited(arguments); }, postCreate: function() { this.inherited(arguments); }, startup: function() { this.inherited(arguments); var frm = dijit.byId('agsdirURLform'); frm.on("submit", dojo.hitch(this, function() { try { var val = dijit.byId('agsdirURLtb').get('value').trim(); this.processUI(val); } catch(ex) { this.log('agsdirURLform on submit, error: ' + ex.message + ex. description + ex.stack); } return false; })); dojo.byId('agsdirURLtb').focus(); } }); // declare AGSDIR return AGSDIR; }); // define("vs/dijit/agsdir" |
<div id="agsDirLayoutContainer" data-dojo-type="dijit/layout/LayoutContainer" data-dojo-props="design:'headline'"> <div id="agsDirTopPane" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'"> <!-- текстовое поле "URL-адрес |cgis.allgis.org (arcgis/rest/services) |" --> <table cellpadding="0" cellspacing="0"><tbody> <tr> <td><label>URL-адрес:</label></td> <td> </td> <td colspan="2"> <div id="agsdirURLform" data-dojo-type="dijit/form/Form"> <script type="dojo/on" data-dojo-event="submit"> console.log('agsdirURLform.submit'); return false; </script> <input name="agsdirURLtb" id="agsdirURLtb" type="text" required="true" value="cgis.allgis.org" data-dojo-type="dijit/form/ValidationTextBox" data-dojo-props="regExp:'[^\\s]+', invalidMessage:'http://cgis.allgis.org/arcgis/rest/services', promptMessage:'cgis.allgis.org/arcgis/rest/services', missingMessage:'http://cgis.allgis.org', placeHolder:'http://server/arcgis/rest/services'" /> <button id="agsdirURLsubmit" data-dojo-type="dijit/form/Button" data-dojo-props="iconClass:'dijitEditorIcon dijitEditorIconPaste', showLabel: false" type="submit"> Go </button> </div> <!-- form --> </td> </tr> </tbody></table> </div> <!-- agsDirTopPane --> </div> |
<script type="text/javascript"> var path_location = location.pathname.replace(/\/[^/]+$/, ''); var dojoConfig = { parseOnLoad: true, packages: [{ name: "utilities", location: path_location + '/javascript' }, { name: "vs", location: path_location + '/javascript/vs' }] }; </script> |
require(["vs/dijit/agsdir"], function(agsdir) { var agsdirDijit = dijit.byId('agsdirDijit'); if(agsdirDijit) { ; } else { agsdirDijit = new agsdir({ id : 'agsdirDijit', map : map }); dojo.byId('agsdirPanel').appendChild(agsdirDijit.domNode); } if (dojo.isIE === 8) { setTimeout(function () { agsdirDijit.startup(); }, 100); } else { agsdirDijit.startup(); } }); |
Posted by Valentin at 12:30 0 comments
Labels: JS
2013-09-25
Python + Excel
from pyexcelerate import Workbook data = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] # data is a 2D array wb = Workbook() wb.new_sheet("sheet name", data=data) wb.save("output.xlsx") ws = wb.new_sheet("test") ws.range("B2", "C3").value = [[1, 2], [3, 4]] wb.save("output.xlsx") ws = wb.new_sheet("sheet name") ws[1][1].value = 15 # a number ws[1][2].value = 20 ws[1][3].value = "=SUM(A1,B1)" # a formula ws[1][4].value = datetime.now() # a date wb.save("output.xlsx") ws = wb.new_sheet("sheet name") ws.cell("A1").value = 12 wb.save("output.xlsx") ws = wb.new_sheet("sheet name") ws[1][1].value = 15 ws.range("A1", "B1").merge() wb.save("output.xlsx")
Posted by Valentin at 12:30 0 comments
Labels: Microsoft Office, python
2013-09-24
Секреты скорости 6
Posted by Valentin at 12:30 0 comments
Labels: windsurfing
2013-09-23
Секреты скорости 5
Posted by Valentin at 12:30 0 comments
Labels: windsurfing
2013-09-20
Секреты скорости 4
Posted by Valentin at 12:30 0 comments
Labels: windsurfing
2013-09-19
Секреты скорости 3
original post http://vasnake.blogspot.com/2013/09/3.html
Posted by Valentin at 12:30 0 comments
Labels: windsurfing
2013-09-18
ssl_error_rx_record_too_long
Listen 80 Listen 443
/etc/apache2/sites-enabled/alwaysglum
mv /etc/apache2/sites-available/alwaysglum /etc/apache2/sites-available/alwaysglum.conf a2ensite alwaysglum rm /etc/apache2/sites-enabled/alwaysglum /etc/init.d/apache2 restart
curl -k https://localhost/ openssl s_client -connect 192.168.1.9:443 -state -debug
Posted by Valentin at 12:30 0 comments
2013-09-17
www-less
server { listen 443; server_name www.clubwindsurf.info; rewrite ^/(.*) https://clubwindsurf.info/$1 permanent; } server { listen 443; server_name clubwindsurf.info; # actual https config ... }
server { listen 443; server_name clubwindsurf.info www.clubwindsurf.info; if ($host !~* ^(clubwindsurf.info)$) { rewrite ^(.*) https://clubwindsurf.info$1 permanent; # actual https config ... }
nginx -V
TLS SNI support enabled
server { listen 80; ## listen for ipv4 listen [::]:80; ## listen for ipv6 listen 443 ssl; listen [::]:443 ssl; ssl_certificate /etc/ssl/certs/www.hostmauritius.net.pem; ssl_certificate_key /etc/ssl/private/www.hostmauritius.net.key; server_name www.hostmauritius.net hostmauritius.net; root /var/www/www.hostmauritius.net/web; if ($http_host != "www.hostmauritius.net") { rewrite ^ $scheme://www.hostmauritius.net$request_uri permanent; } ...
Posted by Valentin at 12:30 0 comments
Labels: HTTPD, web-develop
2013-09-16
Iceweasel vs Firefox
su -l ln -s /opt/firefox/firefox /usr/bin/firefox.real update-alternatives --install /usr/bin/x-www-browser x-www-browser /usr/bin/firefox 50 update-alternatives --install /usr/bin/gnome-www-browser gnome-www-browser /usr/bin/firefox 50 update-alternatives --set x-www-browser /usr/bin/firefox update-alternatives --set gnome-www-browser /usr/bin/firefox
cat /usr/bin/firefox
Posted by Valentin at 12:30 0 comments
Labels: linux, web-browser
2013-09-13
Gnome 3 Shell
Posted by Valentin at 12:30 0 comments
Labels: cheatsheet, linux
2013-09-12
Календарь простофили Вилсона
Posted by Valentin at 12:30 0 comments
Labels: Book
2013-09-11
Красивый прогноз
5-6 сентября 2013 года, две синих звезды - Very good wind. Don't leave your 5.x meter sails at home!
Но холодно!
Большая редкость для Москвы - ветер 9-19 метров/секунду.
А в Хургаде 35 тепла, солнечно и ветер метров 10-12 в секунду.
original post http://vasnake.blogspot.com/2013/09/blog-post_2349.html
Posted by Valentin at 12:30 0 comments
Labels: windsurfing
2013-09-10
Секреты скорости 2
Posted by Valentin at 12:30 0 comments
Labels: windsurfing
2013-09-09
Запретный плод
Posted by Valentin at 02:10 0 comments
Labels: Book
2013-09-06
Секреты скорости
Posted by Valentin at 12:30 0 comments
Labels: windsurfing
2013-09-05
Водный старт
Posted by Valentin at 12:30 0 comments
Labels: windsurfing
2013-09-04
Оверштаг
Posted by Valentin at 12:30 0 comments
Labels: video, windsurfing
2013-09-03
Surfin' Bird
Posted by Valentin at 12:30 0 comments
Labels: music
2013-09-02
Медиагалерея
Posted by Valentin at 12:30 0 comments
Labels: python, web-develop
Архив блога
-
▼
2013
(240)
-
▼
сентября
(21)
- Vagrant
- Закрытие сезона
- dijit
- Python + Excel
- Секреты скорости 6
- Секреты скорости 5
- Секреты скорости 4
- Секреты скорости 3
- ssl_error_rx_record_too_long
- www-less
- Iceweasel vs Firefox
- Gnome 3 Shell
- Календарь простофили Вилсона
- Красивый прогноз
- Секреты скорости 2
- Запретный плод
- Секреты скорости
- Водный старт
- Оверштаг
- Surfin' Bird
- Медиагалерея
-
▼
сентября
(21)