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
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8" session="false" %> | |
<%--@elvariable id="url" type="java.lang.String"--%> | |
<%--@elvariable id="total_records" type="java.lang.Integer"--%> | |
<%--@elvariable id="current_page" type="java.lang.Integer"--%> | |
<%--@elvariable id="page_size" type="java.lang.Integer"--%> | |
<style type="text/css"> | |
div.pagination { | |
margin-top: 10px; |
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
# Bug https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1683383 | |
# Original article https://habrahabr.ru/post/87408/ | |
# create directory | |
mkdir xorg-server | |
cd xorg-server | |
# get sources of required package | |
# may be need to uncomment 'deb-src' lines in sources.list before | |
apt-get source xserver-xorg-core-hwe-16.04 |
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
<%@ taglib tagdir="/WEB-INF/tags/util" prefix="util" %> | |
<%-- tag should be placed to Web-inf/tags/util/toJson.tag --%> | |
<script id="scheduleData" type="json-data"><util:toJson source="${schedule}"/></script> |
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
// http://blog.sandwormz.com/2010/11/rolling-counter-algorithm-pattern.html | |
class Scratch { | |
public static void main(String[] args) { | |
convertPennies(150); | |
} | |
public static String[] labels = {"Nickles", "Dimes", "Quarters", "Dollars"}; | |
public static int[] units = {5, 10, 25, 100}; | |
public static void convertPennies(int pennies) { |
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
// Скрипт ходит по страницам и делает скриншоты div'а | |
// Установка: `npm install puppeteer` | |
// Запуск: `nodejs screenshot.js` | |
// | |
// После работы в директории будет набор файлов 001.png 002.png ... итд | |
// Чтобы их сконвертировать в pdf, можно воспользоваться imagemagick | |
// | |
// # Установить imagemagick | |
// sudo apt-get install imagemagick | |
// |
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
namespace | |
{ | |
inline std::size_t | |
unaligned_load(const char* p) | |
{ | |
std::size_t result; | |
__builtin_memcpy(&result, p, sizeof(result)); | |
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
/* Точки под Windows 9x/NT/ME/2000/XP */ | |
/* Copyright (c) 2004 by Zealot [WB Team] */ | |
#include <windows.h> | |
#pragma hdrstop | |
#include "points.h" | |
HDC hdc; | |
PAINTSTRUCT ps; | |
HPEN hpen; | |
HBRUSH hbrush; |
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
package ru.dz; | |
import org.apache.lucene.analysis.TokenFilter; | |
import org.apache.lucene.analysis.TokenStream; | |
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; | |
import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; | |
import java.io.IOException; | |
import java.util.HashMap; | |
import java.util.Map; |
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
-- После запуска unity-settings-daemon нужно некоторое время подождать, прежде чем | |
-- менять настройки клавиатуры, иначе unity-settings-daemon может поменять их обратно | |
-- Наверное, можно как-то по логам демона понять, что он запустился, но пока сделал по-простому | |
os.execute("pgrep unity-settings-daemon || unity-settings-daemon&") | |
os.execute("sleep 1.5") | |
os.execute("setxkbmap -layout \'\' -option") | |
os.execute("setxkbmap -layout \'us,ru\' -option \'grp:ctrl_shift_toggle\'") | |
os.execute("setxkbmap -option compose:ralt") |
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
FROM ubuntu:14.04 | |
RUN apt-get update && apt-get install -y wget unzip | |
RUN wget https://downloads.sourceforge.net/project/keepass/KeePass%202.x/2.36/KeePass-2.36.zip | |
RUN unzip -d /KeePass KeePass-2.36.zip | |
# xdotool allows KeePass to initiate autoinput (when you press Ctrl+V) | |
RUN apt-get update && apt-get install -y mono-complete xdotool | |
WORKDIR /KeePass/ |
NewerOlder