Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
//Wersja A
int main(){
char input[64];
double product = 1;

Linux

Głównie foldery;

  • /etc - pliki konfiguracyjne
  • /proc - orbaz pamięci, są tam pidy itp
  • /bin - binraki, skompilowane programyu, polecenia do uruchomienia
  • /tmp - pliki tymczasowe
  • /home || ~/ - katalog domowy

Schemat wprowadzania poleceń linuxowych

defmodule Kpsz.Ecto.Point do
@behaviour Ecto.Type
@moduledoc """
Representation of geological point in the database
"""
@extractor ~r/\(([\d.]+),([\d.]+)\)/
def type, do: :string
............
1) test updates and renders chosen resource when data is valid (Kpsz.EventControllerTest)
test/controllers/event_controller_test.exs:47
** (Ecto.ChangeError) value `"(1.23, 2.33)"` for `Kpsz.Event.location` in `update` does not match type Kpsz.Point
stacktrace:
(ecto) lib/ecto/repo/schema.ex:629: Ecto.Repo.Schema.dump_field!/6
(ecto) lib/ecto/repo/schema.ex:638: anonymous fn/6 in Ecto.Repo.Schema.dump_fields!/5
(stdlib) lists.erl:1263: :lists.foldl/3
(ecto) lib/ecto/repo/schema.ex:636: Ecto.Repo.Schema.dump_fields!/5
............
1) test updates and renders chosen resource when data is valid (Kpsz.EventControllerTest)
test/controllers/event_controller_test.exs:47
** (Ecto.ChangeError) value `"(1.23, 2.33)"` for `Kpsz.Event.location` in `update` does not match type Kpsz.Point
stacktrace:
(ecto) lib/ecto/repo/schema.ex:629: Ecto.Repo.Schema.dump_field!/6
(ecto) lib/ecto/repo/schema.ex:638: anonymous fn/6 in Ecto.Repo.Schema.dump_fields!/5
(stdlib) lists.erl:1263: :lists.foldl/3
(ecto) lib/ecto/repo/schema.ex:636: Ecto.Repo.Schema.dump_fields!/5
defmodule Kpsz.Pressence do
use Kpsz.Web, :model
schema "pressences" do
field :state, Kpsz.PressenceState
has_one :user, Kpsz.User, foreign_key: "user_id"
belongs_to :event, Kpsz.Event
timestamps()
defmodule Kpsz.PressenceController do
use Kpsz.Web, :controller
alias Kpsz.Event
alias Kpsz.User
alias Kpsz.Pressence
def assign(conn, %{
"event" => event,
"user" => user}) do
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//Wersja L
int main(){
int** matrix;
int width = 0;
int counter = 0;
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define IT_COUNT 1001
//tablicowanie fcji sin w <a,b> - szereg + fcja biblioteczna
//definicja funkcji szereg x - parametr formalny
double szereg_rek(double x, double it){
if( it >= IT_COUNT)
return x;
defmodule Kpsz.Point do
@behaviour Ecto.Type
@moduledoc """
Representation of geological point in the database
"""
defmodule State do
defstruct x: 0, y: 0
end