Skip to content

Instantly share code, notes, and snippets.

View najlepsiwebdesigner's full-sized avatar

Peter Beňo najlepsiwebdesigner

View GitHub Profile
@najlepsiwebdesigner
najlepsiwebdesigner / gist:32fed5dc2fe2df9a5f6b
Last active March 23, 2016 10:34
Foundation datepicker - limit the view mode to months, use as component
<div class="row collapse date" id="dpMonths" data-date-format="mm/yyyy" data-start-view="year" data-min-view="year" style="max-width:200px;">
<div class="small-2 columns">
<span class="prefix"><i class="fa fa-calendar"></i></span>
</div>
<div class="small-10 columns">
<input size="16" type="text" value="02/2012" readonly>
</div>
</div>
<script>
$(function(){
@najlepsiwebdesigner
najlepsiwebdesigner / gist:f921f23f5bf3e9286acf
Last active March 23, 2016 10:34
Foundation datepicker Time picking enabled and Vietnamese language used
<input type="text" class="span2" value="02-12-1989 12:05" id="dpt">
<script>
$(function(){
$('#dpt').fdatepicker({
format: 'mm-dd-yyyy hh:ii',
disableDblClickSelection: true,
language: 'vi',
pickTime: true
});
});
@najlepsiwebdesigner
najlepsiwebdesigner / gist:b94d0c1d908892d10444
Last active December 23, 2016 07:20
Foundation datepicker close button and data tags example
<input type="text" class="span2" value="02/16/12" data-date-format="mm/dd/yy" id="dp2">
<script>
$(function(){
$('#dp2').fdatepicker({
closeButton: true
});
});
</script>
@najlepsiwebdesigner
najlepsiwebdesigner / gist:b71a309d6fe893486c6a
Last active March 18, 2017 00:27
Foundation datepicker basic example
<input type="text" class="span2" id="dp1">
<script>
$(function(){
$('#dp1').fdatepicker({
initialDate: '02-12-1989',
format: 'mm-dd-yyyy',
disableDblClickSelection: true,
leftArrow:'<<',
rightArrow:'>>',
closeIcon:'X',
cv::Mat ransacTest(
const std::vector<std::vector<cv::DMatch> > &matches, // Matches between two set of keypoints
const std::vector<cv::KeyPoint>& keypoints1,
const std::vector<cv::KeyPoint>& keypoints2,
std::vector<std::vector<cv::DMatch> > &outMatches) {
// Convert keypoints into Point2f
std::vector<cv::Point2f> points1, points2;
for (std::vector<std::vector<cv::DMatch> >::
const_iterator it= matches.begin(); it!= matches.end(); ++it) {
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
<!-- html -->
<a class="btn btn-mini hider-toggle" style="padding:0px 4px;">
<i class="icon-eye-open"></i>
</a>
<span class="hider">{$number->decrypted_password}</span>
<span class="hider-fake">*******</span>
<!-- style -->
<style>
.hider {
@najlepsiwebdesigner
najlepsiwebdesigner / latinise.js
Created June 20, 2013 13:10
latinise function written in javascript
var Latinise={ };Latinise.latin_map={ "Á":"A","Ă":"A","Ắ":"A","Ặ":"A","Ằ":"A","Ẳ":"A","Ẵ":"A","Ǎ":"A","Â":"A","Ấ":"A","Ậ":"A","Ầ":"A","Ẩ":"A","Ẫ":"A","Ä":"A","Ǟ":"A","Ȧ":"A","Ǡ":"A","Ạ":"A","Ȁ":"A","À":"A","Ả":"A","Ȃ":"A","Ā":"A","Ą":"A","Å":"A","Ǻ":"A","Ḁ":"A","Ⱥ":"A","Ã":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ḃ":"B","Ḅ":"B","Ɓ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ć":"C","Č":"C","Ç":"C","Ḉ":"C","Ĉ":"C","Ċ":"C","Ƈ":"C","Ȼ":"C","Ď":"D","Ḑ":"D","Ḓ":"D","Ḋ":"D","Ḍ":"D","Ɗ":"D","Ḏ":"D","Dz":"D","Dž":"D","Đ":"D","Ƌ":"D","DZ":"DZ","DŽ":"DZ","É":"E","Ĕ":"E","Ě":"E","Ȩ":"E","Ḝ":"E","Ê":"E","Ế":"E","Ệ":"E","Ề":"E","Ể":"E","Ễ":"E","Ḙ":"E","Ë":"E","Ė":"E","Ẹ":"E","Ȅ":"E","È":"E","Ẻ":"E","Ȇ":"E","Ē":"E","Ḗ":"E","Ḕ":"E","Ę":"E","Ɇ":"E","Ẽ":"E","Ḛ":"E","Ꝫ":"ET","Ḟ":"F","Ƒ":"F","Ǵ":"G","Ğ":"G","Ǧ":"G","Ģ":"G","Ĝ":"G","Ġ":"G","Ɠ":"G","Ḡ":"G","Ǥ":"G","Ḫ":"H","Ȟ":"H","Ḩ":"H","Ĥ":"H","Ⱨ":"H","Ḧ":"H","Ḣ":"H","Ḥ":"H","Ħ":"H","Í":"I","Ĭ":"I","Ǐ":"I","Î":"I","Ï":"I","Ḯ":"I","İ":"I","Ị":"I","Ȉ
<?php
/* return pluralized form of input type, with respect to amount
*
* @param string type - defines type, possible values are: "hodina", "kus", "mesiac"
* @return string pluralized type in slovak language
*/
function pluralizeAmountSlovak($type, $amount){
$amount = $amount * 1;
var_dump($type);
var_dump($amount);
/* return pluralized form of input type, with respect to amount
*
* @param string type - defines type, possible values are: "hodina", "kus", "mesiac"
* @return string pluralized type in slovak language
*/
function pluralizeAmountSlovak(type, amount){
var dictionary = {
hodina : ['hodina', 'hodiny','hodín'],
kus : ['kus', 'kusy', 'kusov'],
mesiac : ['mesiac', 'mesiace', 'mesiacov']