Skip to content

Instantly share code, notes, and snippets.

View zinoviy23's full-sized avatar
👽

Aleksandr Izmailov zinoviy23

👽
View GitHub Profile
@zinoviy23
zinoviy23 / StackoverflowBlur.java
Last active October 21, 2024 11:02
Stackoverflow Fast Gaussian Blur for all channels
import java.awt.*;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.function.Function;
// Original StackOverflow answer:
// https://stackoverflow.com/a/38285167/11161744
// Updated version applies blur independently for r, g, and b channels
class Blur {
public BufferedImage ProcessImage(Component c, BufferedImage image) {
@zinoviy23
zinoviy23 / sem9_task1.c
Created October 6, 2021 10:09
Решения задач с семинара 9 по операторам языка C
#include <stdio.h>
int main(void) {
int a;
int b;
int points_count = 1;
int in_triangles = 0;
int x;
int y;
double r2;
@zinoviy23
zinoviy23 / Main.java
Created February 2, 2021 15:48
Example of `doOnNext` on simple Reactive Stream
import io.reactivex.rxjava3.core.*;
public class Main {
public static void main(String[] args) throws InterruptedException {
Flowable.fromArray(1, 2, 3, 4, 5)
.doOnNext((i) -> System.out.println("1: " + i))
.map(i -> i + 1)
.doOnNext((i) -> System.out.println("2: " + i))
.filter(i -> i % 2 != 0)
.doOnNext((i) -> System.out.println("3: " + i))
@zinoviy23
zinoviy23 / DbTask.cs
Created May 2, 2019 17:23
Task for simulating SQL db with linq
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
namespace DbTask
{
interface IEntity
{
long Id { get; }
@zinoviy23
zinoviy23 / io.md
Last active April 14, 2019 15:27
Считывание из файла

Шаблон для считывания

try
{
  using (var fileStream = new FileStream("...", FileMode.Create))
  {
    // считывание  
 }