This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(submission). | |
-export([perimeter/1,area/1,enclose/1,bits/1,bits_tr/1]). | |
% Submission | |
% https://gist.github.com/klimisa/d6dd462aaf7b268b064b8dc18fa3dd58 | |
% Shapes | |
perimeter({triangle,A,B,C}) -> | |
A+B+C; | |
perimeter({rectangle,W,L}) -> % W:Witdh,L:Length |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Direct recursion | |
product([])-> | |
1; | |
product([X|Xs])->X*product(Xs). | |
% Tail recursion | |
product(Xs)->product(Xs,1). | |
product([],P)-> | |
P; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(conlists). | |
-export([double/1,test_double/0 | |
,evens/1,test_evens/0 | |
,median/1,test_median/0 | |
,modes/1,test_modes/0 | |
,count/2,test_count/0 | |
]). | |
% Double | |
double([]) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(index). | |
-export([get_file_contents/1,show_file_contents/1 | |
,split/1 | |
]). | |
% Used to read a file into a list of lines. | |
% Example files available in: | |
% gettysburg-address.txt (short) | |
% dickens-christmas.txt (long) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(index). | |
-export([get_file_contents/1,show_file_contents/1,split/1]). | |
% -------------------------------------------------- | |
% !!! IMPORTANT !!! | |
% -------------------------------------------------- | |
% Haven't finished the "Indexing a file" | |
% JUST broke the lines into words and numbered them. | |
% -------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Based on code from | |
%% Erlang Programming | |
%% Francecso Cesarini and Simon Thompson | |
%% O'Reilly, 2008 | |
%% http://oreilly.com/catalog/9780596518189/ | |
%% http://www.erlangprogramming.org/ | |
%% (c) Francesco Cesarini and Simon Thompson | |
-module(frequency). | |
-export([start/0,allocate/0,deallocate/1,stop/0]). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace Eope.Model.Aegises | |
{ | |
public class AegisType | |
{ | |
private readonly List<AegisType> _aegisTypes = new List<AegisType> | |
{ | |
new AegisType("Συνέδριο"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Save(Hospital hospital) | |
{ | |
int numberOfRecordsAffected = 0; | |
using (var connection = new SqlConnection(_applicationSettings.ConnectionString)) | |
{ | |
var command = connection.CreateCommand(); | |
command.CommandText = _UpdateSQL; | |
command.Parameters.Add(new SqlParameter("@Id", hospital.Id)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="Discogs Listings"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Discogs</title> | |
<style type="text/css"> | |
.listItem { | |
background-color: #ccc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Func<UnverifiedAccountDetails, Task<VerifiedAccountDetails> | |
Task<VerifiedAccountDetails> VerifyAccount(UnverifiedAccountDetails details); | |
Func<UnverifiedAccountDetails, Task<VerifiedAccountDetails>> | |
public delegate Task<VerifiedAccountDetails> VerifyAccount(UnverifiedAccountDetails details); | |
OlderNewer