Skip to content

Instantly share code, notes, and snippets.

ln -s /use/share/fontconfig/conf.avail/11-lcdfilter-default /etc/fonts/conf.d
@asilchev
asilchev / check.py
Created August 16, 2022 07:54
RussianPost workflow
def check(int h) {
if ((h >= 8 && h < 10) || (h >=12 && h < 14) || (h >=15 && h < 18) || (h >= 20 && h < 22)) {
return true;
}
return false;
}
package org.sv.sandbox;
import java.util.Arrays;
import java.util.Comparator;
public class VersionComparator implements Comparator<String> {
char[] alpha = new char[] {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r'
, 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
#!/bin/sh
#
FFMPEG=/usr/bin/ffmpeg
# текущее время внизу видео
FILTER="drawtext=fontfile=/usr/share/fonts/liberation/LiberationSans-Regular.ttf: \
text='%{localtime}': x=(w-tw)/2: y=h-(2*lh): fontcolor=white :box=1:boxcolor=0x00000000@1"
# источник
2016-06-15 15:27:01,644 ERROR [r.c.t.n.s.h.b.MessagingBatchExecutor:67] Exception happened executing dml operation over messages !
org.hibernate.exception.ConstraintViolationException: error executing work
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129) ~[hibernate-core.jar:4.3.7.Final]
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) ~[hibernate-core.jar:4.3.7.Final]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126) ~[hibernate-core.jar:4.3.7.Final]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112) ~[hibernate-core.jar:4.3.7.Final]
at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:318) ~[hibernate-core.jar:4.3.7.Final]
at org.hibernate.internal.SessionImpl.doWork(SessionImpl.java:2059) ~[hibernate-core.jar:4.3.7.Final]
at org.hibernate.internal.SessionImpl
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
user nginx;
worker_processes 20;
worker_rlimit_nofile 100000;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
@RequestMapping(value = "/AE_askForCode",
method = RequestMethod.POST,
produces = "application/json; charset=UTF-8")
@ResponseBody
public BaseResponse getCode(@RequestParam(value = "contractId") long contractId) throws UnauthorizedException {
checkUserAuthentication();
String remoteAddress = getIpAddress();
String serial = getSerialNumber();
BaseResponse passMealResponse;
<html>
<head>
<script type="text/javascript">
var total = 18;
var diff = (new Date((new Date(2014, 5, 28, 18, 00)).getTime() - (new Date()).getTime())).getTime() / (36e5);
document.write(diff.toFixed(3) + " hours left... <br>");
</script>
</head>
</html>