require_once './EasyRss.class.php';
$rss = EasyRss::create()->
title('GitHub')->
link('http://github.com/')->
description('GitHub is the best place to build software together. Over 4 million people use GitHub to share code.')->
pubDateByTimestamp(time())->
category('IT')->
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 java.awt.Desktop; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.net.URISyntaxException; | |
import java.net.URL; | |
import java.nio.charset.StandardCharsets; | |
import java.util.HashMap; |
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
<?php | |
/** | |
* Класс работы с мультиязычностью. | |
* | |
* @author aNNiMON, web_demon | |
*/ | |
final class Lang { | |
const PATH = 'lang/'; |
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
private BufferedImage joinHorizontally(BufferedImage[] img) { | |
// Считаем ширину всех картинок | |
int width = img[0].getWidth() * img.length; | |
//int width = 0; | |
//for (int i = 0; i < img.length; i++) width += img[i].getWidth(); | |
// Создаём массив ARGB для полной картинки | |
final int[] all = new int[width*img[0].getHeight()]; | |
for (int i = 0; i < img.length; i++) { | |
// Получаем пиксели очередной картинки |
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
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html"> | |
<link rel="import" href="../topeka-elements/avatars.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../paper-item/paper-item.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../code-mirror/code-mirror.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-field/core-field.html"> |
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
// | |
// Author: Dustin Diaz | |
// http://dustindiaz.com/faster-ajax/ | |
// | |
var asyncRequest = function() { | |
function handleReadyState(o, callback, fallback) { | |
if (!o || o.readyState != 4) return; | |
if (o.status == 200) { | |
if (callback) { | |
callback(o); |
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
<?php | |
/** | |
* Simple template engine | |
*/ | |
class Template { | |
private static $templatesPath = 'templates/'; | |
private static $cache = array(); | |
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 saveFile(filename, data) { | |
var blob = new Blob([data], {type:'text/plain'}); | |
var saveLink = document.createElement("a"); | |
saveLink.download = filename; | |
saveLink.innerHTML = "Save file"; | |
if (window.webkitURL != null) { | |
saveLink.href = window.webkitURL.createObjectURL(blob); | |
} else { | |
saveLink.href = window.URL.createObjectURL(blob); | |
saveLink.onclick = destroyClickedElement; |
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() { | |
var exuaTitle = $('h1').text(); | |
var out = exuaTitle + '\n=================='; | |
$('.list tr').slice(1).each(function(i, e) { | |
var nameRow = $(e).find('a[title]'); | |
var id = nameRow.attr('href').substring(nameRow.attr('href').lastIndexOf('/') + 1); | |
var title = nameRow.attr('title'); | |
var infoRow = $(e).find('td[align=right]'); | |
var md5 = infoRow.find('a').first().text(); |
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 saveFile(filename, data) { | |
var blob = new Blob([data], {type:'text/plain'}); | |
var saveLink = document.createElement("a"); | |
saveLink.download = filename; | |
saveLink.innerHTML = "Save file"; | |
var url = window.URL || window.webkitURL || window.mozURL || window.msURL; | |
saveLink.href = url.createObjectURL(blob); | |
saveLink.onclick = destroyClickedElement; | |
saveLink.style.display = "none"; | |
document.body.appendChild(saveLink); |