Skip to content

Instantly share code, notes, and snippets.

View sjchmiela's full-sized avatar
🕊️
Have a great day!

Stanisław Chmiela sjchmiela

🕊️
Have a great day!
View GitHub Profile
defmodule Sheetly.Schema.Phase do
@custom_phases [
Sheetly.Schema.Phase.Authorization,
]
def pipeline(config, opts) do
@custom_phases
|> Enum.reduce(Absinthe.Plug.default_pipeline(config, opts), &pipe_through_phase/2)
end
defmodule Sheetly.Schema.Types do
@moduledoc """
Types used by GraphQL endpoint
"""
import Canada, only: [can?: 2]
use Absinthe.Schema.Notation
use Absinthe.Relay.Schema.Notation
alias Ecto.{Date, DateTime}
alias Sheetly.{
ContractResolver,
defmodule Sheetly.Schema do
@moduledoc """
GraphQL schema
"""
use Absinthe.Schema
use Absinthe.Relay.Schema
import_types Sheetly.Schema.Types
alias Sheetly.{
ProjectMembershipResolver,
AuthenticationResolver,
func customSubsetMinus(A A: [Int], B: [Int]) -> [Int] {
var subset = [Int]()
for a in A {
let occurrences = B.reduce(0, combine: {
(sum, b) -> Int in
return sum + Int(a == b)
})
package PersonZC;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* Created by sjchmiela on 22.04.2014.
*/
public class Main

KURDE też mi polskie nie dzialaja łąłńźżćóą masz, skopiuj sobie xD no, już już:D

package edu.osego.cs.dl; // ten plik należy do pakietu edu.osego.cs.dl, będzie się znajdował pewnie gdzieś w katalogu projekty/edu/osego/cs/dl
import java.io.*; // importujemy bibliotekę (niewskazane wszystko na raz)
import java.utils.ArrayList; // importujemy bibliotekę (wskazane, co trzeba)
#!/bin/bash
trap 'date; exit' SIGINT # przed zakończeniem wypiszę datę
if [ -z $1 ]; then # jeśli pierwszy argument nie istnieje
ARG=10 # argumentem będzie 10
else
ARG=$1 # no chyba że istnieje
fi
#include <cstdio>
#include "../libraries/min-chain.cpp"
using namespace std;
bool member(node* list, int val)
{
while(list != NULL)
{
if(list->w == val)
#include <cstdio>
using namespace std;
int t[8][8] =
{
{9, 9, 9, 9, 5, 6, 7, 8},
{8, 8, 4, 3, 1, 1, 1, 1},
{7, 7, 5, 2, 1, 1, 1, 1},
{1, 6, 6, 1, 1, 1, 1, 1},
#include <cstdio>
using namespace std;
/*const int N = 4;
const int t[N][N] = {
{1,2,2,1},
{1,2,2,0},
{2,1,1,0},
{2,2,2,2}