Skip to content

Instantly share code, notes, and snippets.

View pihanya's full-sized avatar
🛠️

Mikhail Gostev pihanya

🛠️
View GitHub Profile
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
public class CaptchaGenerator {
private static BufferedImage captcha = new BufferedImage( 800, 250, BufferedImage.TYPE_INT_RGB );
private static final Font font = new Font( "Times New Roman", Font.PLAIN, 96 );
@pihanya
pihanya / running_string_short.txt
Last active January 21, 2018 03:49
БЭВМ. Ввод из ВУ-7(клавиатура) в ВУ-5 (бегущая строка). Сокращенная версия.
ORG 0
RETINTER: WORD ? ; Ячейка возврата из подпрограммы по обработке прерываний
BR INT ; Переход к обработке прерываний
ORG 08
SYMADR: WORD ? ; Используется в подпрограмме PRINTS
; Хранит в себе указатель на ячейку памяти, вывод значения которой производится на ВУ-5
QPTR: WORD ? ; Используется в подпрограмме PUSH и POP
; Хранит в себе адрес, по которому будет расположен следующий элемент очереди
@pihanya
pihanya / running_string.txt
Last active January 21, 2018 03:49
БЭВМ. Ввод из ВУ-7(клавиатура) в ВУ-5 (бегущая строка).
ORG 0
RETINTER: WORD ? ; Ячейка возврата из подпрограммы по обработке прерываний
BR INT ; Переход к обработке прерываний
ORG 08
SYMADR: WORD ? ; Используется в подпрограмме PRINTS
; Хранит в себе указатель на ячейку памяти, вывод значения которой производится на ВУ-5
QPTR: WORD ? ; Используется в подпрограмме PUSH и POP
; Хранит в себе адрес, по которому будет расположен следующий элемент очереди
Field f = obj.getClass().getDeclaredField("peremennaya"); // obj - объект класса, в котором тебе нужно найти переменную. Здесь может выскочить NoSuchFieldException
f.setAccessible(true); // Делаем поле доступным для чтение ("снимаем" модификатор private)
SomeClass iWantThis = (SomeClass) f.get(obj); // SomeClass - класс переменной. Здесь может выскочить IllegalAccessException
A few days ago I met Elon Musk, founder of Tesla and SpaceX companies, at Tesla Expo 2017 where newly-designed cars and trucks were shown. Elon was giving an exclusive interview to three pupils from two schools which got this opportunity for making the best reports about Tesla cars. I was one of those pupils.
All of us were sitting in press conference room with Elon Mast in the middle of Tesla Expo. He said he had time only for three questions from each of us. I immediately took an initiative and began asking him my questions. At first I wanted to know what was the Elon’s role in Tesla Company is and what he did there. ‘Well, a long time ago, I had been developing new models of cars for the first three or four years after founding of Tesla together with engineers, but year by year more specialists came to work for Tesla and at some moment I found out that I would be more effective if I concentrate on doing only CEO stuff, so now I’m just sitting in chair and visit some events like this seldom.’ – said he smi
#include <cstdlib>
#include <iostream>
#include <set>
using namespace std;
int main() {
int m, n;
cin >> m >> n;
int arr[m][n];
@pihanya
pihanya / gist:75bd4544614d3898847490d49be0a9f9
Last active November 19, 2017 13:02
3 уровень. Задача 11а
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{