Skip to content

Instantly share code, notes, and snippets.

View ulvham's full-sized avatar

ulvham ulvham

View GitHub Profile
@ulvham
ulvham / 1.txt
Last active December 24, 2015 11:43
blacknote
connect (&watcher, SIGNAL(finished()), this, SLOT(hidepar()));
@ulvham
ulvham / note.txt
Created February 24, 2014 15:13
wb live
1) включить ssh
2) бэкап MBR
dd if=/dev/sda bs=15728640 count=1 | bzip2 > /DataVolume/shares/Public/SDA_MBR_FREESPACE.bz2
dd if=/dev/sda1 | bzip2 > /DataVolume/shares/Public/SDA1_IMAGE.bz2
dd if=/dev/sda2 | bzip2 > /DataVolume/shares/Public/SDA2_IMAGE.bz2
3) отключить twonky
/etc/init.d/twonky stop
4) Локализовать доступ через Putty
~/.profile
~/.bashrc
@ulvham
ulvham / ex1.cpp
Created February 16, 2014 22:35
fuck
QImage scale(const QImage &image)
{
qDebug() << "In thread" << QThread::currentThread();
return image.scaled(QSize(100, 100), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
@ulvham
ulvham / faq.txt
Created January 24, 2014 00:44
Sublime_faq
Переход по фрагментам
Win/Linux: CTRL+R
Mac: CMD+R
Вероятно, самое полезное сочетание клавиш для экономии вашего времени. Содержимое документа разбивается на определенные фрагменты (функции, HTML теги или CSS стили). Переход происходит при выборе соответствующего фрагмента во всплывающем окне.
Переход по файлам
Win/Linux: CTRL+P
@ulvham
ulvham / auto_imus.py
Created January 23, 2014 21:08
Sikuli
# Sikuli is released under the MIT License.
# ========================================
# Copyright (c) 2010-2011 Sikuli.org
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@ulvham
ulvham / test01.cpp
Created January 23, 2014 12:53
black_test_v01
#include "widget.h"
#include "ui_widget.h"
const QString general_name_settings="config";
const QString general_path_settings="/settings/"+general_name_settings+".ini";
const QString sett_sql_name="SQL";
const QString sett_base_name="Bases";
Widget::Widget(QWidget *parent) :
QWidget(parent),
@ulvham
ulvham / 111.cpp
Created January 23, 2014 10:56
Qt
#include "database.h"
database::database(QString base_path)
{
db = QSqlDatabase::addDatabase(QLatin1String("QODBC"));
dbpath = base_path;
}
void database::dbopen()
{
Sub DeleteAllLines()
With ThisWorkbook.VBProject.VBComponents("Module1").CodeModule
.DeleteLines 1, .CountOfLines
End With
End sub
@ulvham
ulvham / bugs.txt
Last active January 4, 2016 01:09
SQL_Metrology
1) +0 и +1 а не +1 +2
2) %7 incorrect type or incorrect read
3) size is not easy to use, crop form to fill information
4) settings date po don't save
5) sql text is bigger then 1/2 sheet
Function DativeCase(sSurname$, Optional sName$, Optional sPatronymic$) As String
' Функция формирует дательный падеж из ФИО
' Параметры: sSurname - фамилия, sName - имя, sPatronymic - отчество
Application.Volatile True ' автопересчёт формулы на листе
sSurname$ = Replace(sSurname$, " - ", "-"): sSurname$ = Replace(Replace(sSurname$, " -", "-"), "- ", "-")
On Error Resume Next
If sName$ = "" And sPatronymic$ = "" Then
arr = Split(Application.Trim(sSurname$))