Openswan tunnel to Juniper SSG
http://www.pedro.kiefer.com.br/2012/10/openswan-tunnel-to-juniper-ssg
понедельник, октября 29, 2012
вторник, октября 23, 2012
Functional Programming Principles in Scala. Week 04. Huffman Coding
Лаконичный подсчет частоты символов в scala 2.8
def freq(chars: List[Char]): List[(Char, Int)] = chars.groupBy(x => x).mapValues(_.length).toList
http://nikolajlindberg.blogspot.com/2010/02/counting-strings-and-things-in-scala-28.html
def freq(chars: List[Char]): List[(Char, Int)] = chars.groupBy(x => x).mapValues(_.length).toList
http://nikolajlindberg.blogspot.com/2010/02/counting-strings-and-things-in-scala-28.html
воскресенье, октября 21, 2012
HTML5 video start stop
Как оказывается все запущено. http://stackoverflow.com/questions/2879227/html5-video-stop-onclose
Starting Video with different browsers
For Opera 12
window.navigator.getUserMedia(param, function(stream) {
video.src =window.URL.createObjectURL(stream);
}, videoError );
For Firefox Nightly 18.0
window.navigator.mozGetUserMedia(param, function(stream) {
video.mozSrcObject = stream;
}, videoError );
For Chrome 22
window.navigator.webkitGetUserMedia(param, function(stream) {
video.src =window.webkitURL.createObjectURL(stream);
}, videoError );
Stopping video with different browsers
For Opera 12
video.pause();
video.src=null;
For Firefox Nightly 18.0
video.pause();
video.mozSrcObject=null;
For Chrome 22
video.pause();
video.src="";
воскресенье, октября 07, 2012
Functional Programming Principles in Scala. Week 03. Object-Oriented Sets
Основная часть кажется особой сложности не представляет. Отмечу только однострочную лаконичность проверки строки на содержание в ней слов из списка.
val wordList = List("scala", "akka", "play framework", "sbt", "typesafe")
val tweet = "This is an example tweet talking about scala and sbt."
wordList.exists(tweet.contains)
Еще 10 других эффектных решений в одну строку http://mkaz.com/solog/scala/10-scala-one-liners-to-impress-your-friends.html
четверг, сентября 27, 2012
Functional Programming Principles in Scala. Week 02. Functional Sets
Публиковать ответы на задания курса запрещено. Осознал, больше не буду.
среда, сентября 26, 2012
Functional Programming Principles in Scala. Week 01. Recursion
Добрался наконец до курса https://class.coursera.org/progfun-2012-001/class/index
Неделя 1.
Задача 1. Треугольник Паскаля
Задача 2. Задача на правильное закрытие скобок
Задача 3. Размен монетами
решение ищите сами )
четверг, августа 09, 2012
PrintScreen на MacBook в Windows
Fn+shift+F11 == Print Screen
Fn+shift+Alt+F11 == Print Screen для активного окна
http://www.partsgroup.ru/content/printscreen-na-macbook-v-windows
Fn+shift+Alt+F11 == Print Screen для активного окна
http://www.partsgroup.ru/content/printscreen-na-macbook-v-windows
понедельник, июля 30, 2012
Ссылки 2012-08
Comparing open source private cloud platforms
http://www.slideshare.net/OReillyOSCON/comparing-open-source-private-cloud-platforms
http://www.slideshare.net/OReillyOSCON/comparing-open-source-private-cloud-platforms
пятница, июля 13, 2012
Akka 2.0.1+ZeroMQ 2.2.0 на Windows 7 x64
На машине с Windows 7 x64 ZeroMQ (http://www.zeromq.org/) в проекте с Akka (http://doc.akka.io/docs/akka/2.0/scala/zeromq.html) завелось только при использовании x86 JVM и x86 ZeroMQ. Видимо в дистрибутиве ZeroMQ x64 библиотеки под 32 битную платформу и JNA в JVM x64 с этим работать не хочет.
Важно!
После установки ZeroMQ в папку без длинных имен не забудьте переименовать libzmq-v100-mt.dll в libzmq.dll, иначе JNA ее не найдет. Ну и добавьте папку \bin ZeroMQ в PATH в переменных окружения.
суббота, июня 16, 2012
Ссылки 2012-06
This is a classic CRUD application, backed by MongoDB.
https://github.com/bjartek/computer-database-mongo
ZeroMQ + Akka
http://doc.akka.io/docs/akka/2.0.2/scala/zeromq.html
Akka zeromq sever
akka-zeromq-serverhttps://github.com/jiminoc/akka-zeromq-server
Install ZeroMQ in Mac OS X
1) install homedrew
https://github.com/mxcl/homebrew/wiki/installation
2) #brew install zeromq --universal
ZeroMQ PUSH/PULL sample implementation
https://gist.github.com/2222634
Timeout in Play! 2.0 Action
def index = Action { request =>
Async {
WS.url(someURL)
.get().map( response => Ok(html.viewModel(someModel)))
.orTimeout(100, InternalServerError)
.map(_.fold(identity,identity))
}
}
https://github.com/bjartek/computer-database-mongo
ZeroMQ + Akka
http://doc.akka.io/docs/akka/2.0.2/scala/zeromq.html
Akka zeromq sever
akka-zeromq-serverhttps://github.com/jiminoc/akka-zeromq-server
Install ZeroMQ in Mac OS X
1) install homedrew
https://github.com/mxcl/homebrew/wiki/installation
2) #brew install zeromq --universal
ZeroMQ PUSH/PULL sample implementation
https://gist.github.com/2222634
Timeout in Play! 2.0 Action
def index = Action { request =>
Async {
WS.url(someURL)
.get().map( response => Ok(html.viewModel(someModel)))
.orTimeout(100, InternalServerError)
.map(_.fold(identity,identity))
}
}
понедельник, апреля 30, 2012
Ссылки 2012-05
RESTful API Design: Teach a Dog to REST
http://blog.apigee.com/detail/restful_api_design/
Scala frameworks and tools
http://www.scoop.it/t/scala-frameworks-and-tools
Word Count MapReduce with Akka
http://www.javacodegeeks.com/2012/04/word-count-mapreduce-with-akka.html
http://blog.apigee.com/detail/restful_api_design/
Scala frameworks and tools
http://www.scoop.it/t/scala-frameworks-and-tools
Word Count MapReduce with Akka
http://www.javacodegeeks.com/2012/04/word-count-mapreduce-with-akka.html
среда, апреля 25, 2012
ESXi 5.x + Microsoft iSCSI Software Target 3.3
Использование iSCSI traget на Windows 2008 в VMWare ESXi 5.x
качаем
Microsoft iSCSI Software Target 3.3
http://www.microsoft.com/download/en/details.aspx?id=19867
подключаем диск в VMWare ESXi 5.x
http://vforv.me/2011/05/01/%D0%BF%D0%BE%D0%B4%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D0%B5%D0%BC-microsoft-iscsi-software-target-%D1%83-esxesxi-%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80-lab-environment/
качаем
Microsoft iSCSI Software Target 3.3
http://www.microsoft.com/download/en/details.aspx?id=19867
подключаем диск в VMWare ESXi 5.x
http://vforv.me/2011/05/01/%D0%BF%D0%BE%D0%B4%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D0%B5%D0%BC-microsoft-iscsi-software-target-%D1%83-esxesxi-%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80-lab-environment/
среда, марта 21, 2012
jQuery 1.7.1 & Streaming
Убил времени, пока не нашел
http://stackoverflow.com/questions/6035987/can-i-use-jquery-prefilters-to-detect-onreadystatechange-events-where-readystate
Рабочий код
http://stackoverflow.com/questions/6035987/can-i-use-jquery-prefilters-to-detect-onreadystatechange-events-where-readystate
Рабочий код
$.ajaxPrefilter(function( options, _, jqXHR ) {
if ( options.onreadystatechange ) {
var xhrFactory = options.xhr;
options.xhr = function() {
var xhr = xhrFactory.apply( this, arguments );
function handler() {
options.onreadystatechange( xhr, jqXHR );
}
if ( xhr.addEventListener ) {
xhr.addEventListener( "readystatechange", handler, false );
} else {
setTimeout( function() {
var internal = xhr.onreadystatechange;
if ( internal ) {
xhr.onreadystatechange = function() {
handler();
internal.apply( this, arguments );
};
}
}, 0 );
}
return xhr;
};
}
});
function log(s) {
$( "body" ).append( s + "<br>" );
}
function xhrStreaming() {
$.ajax({
type: "GET",
url: '/echo/json',
cache: false,
onreadystatechange: function( xhr ) {
log( "(" + xhr.readyState + ") '" + xhr.responseText + "'" );
},
success: function( data ) {
log( "ajax success" );
},
error: function( _, _, e ) {
log( "ajax error" );
}
});
}
xhrStreaming();
суббота, марта 10, 2012
Backbone.js ToDo + Play! 2.0
На досуге сделал пример реализации серверной части для классического веб-приложения Backbone.js ToDo с использованием Play Framework 2.0.
https://github.com/olegsmith/backboneplay
https://github.com/olegsmith/backboneplay
четверг, марта 01, 2012
вторник, февраля 28, 2012
Подписка на Google Groups в Google Reader
https://groups.google.com/group/НАИМЕНОВАНИЕ_ГРУППЫ/feed/rss_v2_0_msgs.xml
понедельник, февраля 20, 2012
Ссылки 2012-03
Backbone
Using JSONP with Backbone JS
http://iainjmitchell.com/blog/?p=777
Sample App with Backbone.js and Twitter Bootstrap
http://coenraets.org/blog/2012/02/sample-app-with-backbone-js-and-twitter-bootstrap/
Play 2.0: Akka, Rest, Json and dependencies
http://www.smartjava.org/content/play-20-akka-rest-json-and-dependencies
How to make the debugging in playframework in IntelliJ Idea
http://stackoverflow.com/a/9190408
PlayFramework Setting-up IDEA
http://www.playframework.org/documentation/1.2.4/ide#intellij
Setting Up Play Framework Apps in IntelliJ IDEA
http://www.jamesward.com/2011/10/24/setting-up-play-framework-apps-in-intellij-idea
Akka
Scaling Out with Scala and Akka on Heroku
http://devcenter.heroku.com/articles/scaling-out-with-scala-and-akka
Using JSONP with Backbone JS
http://iainjmitchell.com/blog/?p=777
Sample App with Backbone.js and Twitter Bootstrap
http://coenraets.org/blog/2012/02/sample-app-with-backbone-js-and-twitter-bootstrap/
backbone_query - MongoDB-like query interface to Backbone collections
http://thechangelog.com/post/16469801977/backbone-query-mongodb-like-query-interface-to-backbone
Backbone Live Collections
http://weblog.bocoup.com/backbone-live-collections/
Integrating JSON feed with Backbone JS
http://stackoverflow.com/questions/5629972/integrating-json-feed-with-backbone-js
Toying with Backbone.js, Node.js & MongoDB
http://code.emilientaque.fr/toying-with-backbonejs-nodejs-mongodb.html
http://thechangelog.com/post/16469801977/backbone-query-mongodb-like-query-interface-to-backbone
Backbone Live Collections
http://weblog.bocoup.com/backbone-live-collections/
Integrating JSON feed with Backbone JS
http://stackoverflow.com/questions/5629972/integrating-json-feed-with-backbone-js
Toying with Backbone.js, Node.js & MongoDB
http://code.emilientaque.fr/toying-with-backbonejs-nodejs-mongodb.html
Backbone Koans for QUnit
https://github.com/addyosmani/backbone-koans-qunit
Openlayers with Backbone.js
https://groups.google.com/d/topic/backbonejs/rAdak0Px2LA/discussion
Backbone Google group
https://groups.google.com/forum/?fromgroups#!forum/backbonejs
https://github.com/addyosmani/backbone-koans-qunit
Openlayers with Backbone.js
https://groups.google.com/d/topic/backbonejs/rAdak0Px2LA/discussion
Backbone Google group
https://groups.google.com/forum/?fromgroups#!forum/backbonejs
An overloaded version of Backbone.Sync that uses the JQuery AJAX Queue plugin
https://github.com/jbutz/Backbone.Sync.AjaxQueue
https://github.com/jbutz/Backbone.Sync.AjaxQueue
Play Framework
Play 2.0: Akka, Rest, Json and dependencies
http://www.smartjava.org/content/play-20-akka-rest-json-and-dependencies
How to make the debugging in playframework in IntelliJ Idea
http://stackoverflow.com/a/9190408
PlayFramework Setting-up IDEA
http://www.playframework.org/documentation/1.2.4/ide#intellij
Setting Up Play Framework Apps in IntelliJ IDEA
http://www.jamesward.com/2011/10/24/setting-up-play-framework-apps-in-intellij-idea
Play framework Google group
https://groups.google.com/forum/?fromgroups#!forum/play-framework
https://groups.google.com/forum/?fromgroups#!forum/play-framework
Play 2.0 Scala + MongoDB via Salat
https://gist.github.com/1406158
Akka
Scaling Out with Scala and Akka on Heroku
http://devcenter.heroku.com/articles/scaling-out-with-scala-and-akka
Подписаться на:
Сообщения (Atom)
Мой список блогов
-
-
Notes on LLMapгод назад
-
Строительноегод назад
-
Будем честными ...год назад
-
Highscalability is Up For Sale2 года назад
-
-
-
-
-
Go Composition vs Inheritance6 лет назад
-
Welcome, Prashanth!6 лет назад
-
Top Developer Collaboration Tools6 лет назад
-
Транспортный микс7 лет назад
-
-
Исповедь скрам тестера7 лет назад
-
-
Running JRuby on the Graal JIT7 лет назад
-
-
-
Скрепкус гигантус8 лет назад
-
Мои твиты8 лет назад
-
-
-
6990 рублей9 лет назад
-
-
Смирение и американские боеголовки9 лет назад
-
-
-
-
-
-
Measuring Activity Startup Time10 лет назад
-
-
-
-
-
Рассказ жителя Мариуполя из первых рук12 лет назад
-
-
Grails - Convention over Configuration12 лет назад
-
$ (dollar) prefix for angularJS12 лет назад
-
-
-
-
Блог закрыт!12 лет назад
-
-
Websphere portal. Create pages programmatically13 лет назад
-
-
-
Tweetbot для Mac13 лет назад
-
Scala-IO Core: Unmanaged Resources13 лет назад
-
Использование шрифтов в JasperReports13 лет назад
-
Аудит менеджмента качества13 лет назад
-
-
Windows 8 Camp14 лет назад
-
-
-
Переезд14 лет назад
-
CSP15 лет назад
-
-
Графоманам15 лет назад
-
ListView Multiple Selection 215 лет назад
-
-
-
UnitOfWork & IdentityMap17 лет назад
-
-
-
-
-
-
-
-
-