Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//Wersja L
int main(){
int** matrix;
int width = 0;
int height = 0;
@Hajto
Hajto / kpsz.md
Last active October 12, 2016 11:01 — forked from baransu/kpsz.md

fichery

  • zarzadzanie uzytkownikami
    • przydzielanie praw
    • dodawanie
    • usuwanie
    • crud
  • zarzadzanie wydarzeniami (crud)
    • zdjecia z wydarzenia (osoby biorace udzial i organizator)
    • wielostopniowe dodawanie uzytkownikow
  • nic nie wiadomo
FROM jenkins
# if we want to install via apt
USER root
RUN curl -L https://get.docker.com/builds/Linux/x86_64/docker-1.10.3 > /usr/bin/docker && chmod +x /usr/bin/docker
#Install the stuff you need
#USER jenkins
@Hajto
Hajto / editor.js
Last active June 10, 2016 10:44 — forked from Pan-Maciek/editor.js
var Editor = function(el){
this.element = el
this.cursors = []
this.lines = []
}
Editor.prototype.creatLine = function (linenum){
var that = this
var el = document.createElement("p")
el.addEventListener("click",function(){
that.lines.push(el)
var Editor = function(el){
this.element = el;
this.cursors = [];
this.lines = [];
this.creatLine = function (linenum){
var that = this;
var el = document.creatElement("p")
el.adEvenListener("click",function(){
//that to ten obiekt
},true);
@Hajto
Hajto / giveaway_manager.ex
Last active April 7, 2016 06:53
Elixir Deadlock, don't ever try to the same thing.
defmodule TwitchSniper.GiveawayManager do
use GenServer
require Logger
def start_link do
GenServer.start_link(__MODULE__, :ok, name: __MODULE__)
end
def new_giveaway(item) do
GenServer.cast(__MODULE__, {:new_item, item})
@Hajto
Hajto / err
Last active March 11, 2016 18:49
exited in: GenServer.call(Hound.SessionServer, {:change_session, #PID<0.373.0>, :default, %{}}, 60000)
** (EXIT) an exception was raised:
** (MatchError) no match of right hand side value: {:error, %HTTPoison.Error{id: nil, reason: :timeout}}
(hound) lib/hound/request_utils.ex:43: Hound.RequestUtils.send_req/4
(hound) lib/hound/session_server.ex:67: Hound.SessionServer.handle_call/3
(stdlib) gen_server.erl:629: :gen_server.try_handle_call/4
(stdlib) gen_server.erl:661: :gen_server.handle_msg/5
(stdlib) proc_lib.erl:239: :proc_lib.init_p_do_apply/3
Application.ensure_all_started(:hound)
ExUnit.start
Mix.Task.run "ecto.create", ~w(-r PatronLeague.Repo --quiet)
Mix.Task.run "ecto.migrate", ~w(-r PatronLeague.Repo --quiet)
Ecto.Adapters.SQL.begin_test_transaction(PatronLeague.Repo)
defmodule ApiHelper do
use ExUnit.Case, async: false
use PatronLeague.ConnCase
public static Bitmap flipHorizontallu(Bitmap bmp){
Matrix matrix = new Matrix();
matrix.postScale(-1.0f, 1.0f);
return Bitmap.createBitmap(bmp, 0, 0, bmp.getWidth(), bmp.getHeight(), matrix, true);
}
public static Bitmap flipVertically(Bitmap bmp){
Matrix matrix = new Matrix();
matrix.postScale(1.0f, -1.0f);
return Bitmap.createBitmap(bmp, 0, 0, bmp.getWidth(), bmp.getHeight(), matrix, true);
package com.cronline.haito.projectbeggining.util;
import android.content.Context;
import android.hardware.Camera;
import android.util.Log;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import com.cronline.haito.projectbeggining.activities.camera.CameraActivity;