This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%encoding utf-8 | |
\documentclass[12pt]{article} | |
\usepackage[greek,english]{babel} | |
\usepackage[utf8x]{inputenc} | |
\begin{document} | |
{\selectlanguage{greek}Ελληνικά και} english | |
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import struct | |
import SocketServer | |
from base64 import b64encode | |
from hashlib import sha1 | |
from mimetools import Message | |
from StringIO import StringIO | |
# import threading | |
class WebSocketsHandler(SocketServer.StreamRequestHandler): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
[ | |
[ | |
"Βασίλειος", | |
"Βασίλης", | |
"Βάσος", | |
"Βασίλας", | |
"Βασιλάκης", | |
"Μπίλλης", | |
"Μπίλης", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getSquare(canvas, evt) { | |
var rect = canvas.getBoundingClientRect(); | |
var values = this.scroller.getValues(); | |
return { | |
x: Math.ceil((((evt.clientY - rect.top + values.top) / values.zoom) - ((evt.clientY - rect.top + values.top)/values.zoom) % cellHeight) / cellHeight), | |
y: Math.ceil((((evt.clientX - rect.left + values.left) / values.zoom) - ((evt.clientX - rect.left + values.left)/values.zoom) % cellWidth) / cellWidth) | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs') | |
var rawData = JSON.parse(fs.readFileSync('city.list.json', 'utf8')) | |
var formatedData = {} | |
rawData.forEach(function(city){ | |
var country = city.country | |
if (!(country in formatedData)){ | |
formatedData[country] = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unique: (array, test) -> | |
result = [] | |
seen = [] | |
for item in array | |
computed = test(item) | |
if seen.indexOf(computed) | |
seen.push(computed) | |
result.push(item) | |
return result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@if ($paginator->hasPages()) | |
<nav class="pagination"> | |
<a href="{{ $paginator->previousPageUrl() }}" | |
class="pagination-previous {{ $paginator->onFirstPage() ? 'is-disabled': '' }}"> | |
Previous | |
</a> | |
<a href="{{ $paginator->nextPageUrl() }}" | |
class="pagination-next {{ !$paginator->hasMorePages() ? 'is-disabled': '' }}"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function scrollOffset(el) { | |
const box = el.getBoundingClientRect(); | |
const body = document.body; | |
const docEl = document.documentElement; | |
const scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop; | |
const scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft; | |
const clientTop = docEl.clientTop || body.clientTop || 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"exclude": [ | |
".git/**", | |
"node_modules/**", | |
"bower_components/**" | |
], | |
"always-semicolon": true, | |
"block-indent": " ", | |
"color-case": "lower", | |
"color-shorthand": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Detect elements that add horizontal scroll to the page | |
docWidth = document.documentElement.offsetWidth | |
Array.from(document.getElementsByTagName("*")).filter(el => { | |
const rect = el.getBoundingClientRect() | |
return rect.right > docWidth || rect.left < 0 | |
}) |
OlderNewer