commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 4.24k | new_contents stringlengths 1 5.44k | subject stringlengths 14 778 | message stringlengths 15 9.92k | lang stringclasses 277
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
dc40fa36d3205d2c463661b8c808fae4daaf873c | modules/lang/latex/+ref.el | modules/lang/latex/+ref.el | ;;; lang/latex/+ref.el -*- lexical-binding: t; -*-
(defvar +latex-bibtex-file ""
"File AUCTeX (specifically RefTeX) uses to search for citations.")
(def-package! reftex
:hook ((latex-mode LaTeX-mode) . turn-on-reftex)
:init
(setq reftex-plug-into-AUCTeX t
reftex-toc-split-windows-fraction 0.3)
:conf... | Move referencing setup into different file | Move referencing setup into different file
| Emacs Lisp | mit | UndeadKernel/emacs_doom,UndeadKernel/emacs_doom,hlissner/.emacs.d,hlissner/.emacs.d,UndeadKernel/emacs_doom,hlissner/doom-emacs,hlissner/.emacs.d,hlissner/.emacs.d,hlissner/doom-emacs,hlissner/.emacs.d,hlissner/.emacs.d,UndeadKernel/emacs_doom,hlissner/.emacs.d,hlissner/doom-emacs,hlissner/.emacs.d,hlissner/doom-emacs,... | |
20f47e127bed347a40efc5829ea0023c647b7c51 | lisp/init-auto-complete.el | lisp/init-auto-complete.el | ;;; Basic ruby setup
(require-package 'auto-complete)
(global-auto-complete-mode t)
(define-key ac-mode-map (kbd "M-TAB") 'auto-complete)
(provide 'init-auto-complete)
| ;;; Basic ruby setup
(require-package 'auto-complete)
(global-auto-complete-mode t)
(define-key ac-mode-map (kbd "M-TAB") 'auto-complete)
(add-to-list 'ac-modes 'coffee-mode)
(add-to-list 'ac-modes 'enh-ruby-mode)
(provide 'init-auto-complete)
| Add some more auto complete modes | Add some more auto complete modes
| Emacs Lisp | mit | lstoll/dotfiles,lstoll/repo,lstoll/dotfiles,lstoll/repo,lstoll/repo,lstoll/dotfiles |
d6e6485d862035d6bbd909f4daf69ff21f193a37 | init-package/init-ruby-mode.el | init-package/init-ruby-mode.el | (require 'ruby-mode)
(add-to-list 'auto-mode-alist
'("\\.\\(rb\\|ru\\|builder\\|rake\\|thor\\|gemspec\\)\\'" .
ruby-mode))
(add-to-list 'auto-mode-alist
'("\\(rake\\|thor\\|guard\\|gem\\|cap\\|vagrant\\)file\\'" .
ruby-mode))
| Add file association to ruby-mode | Add file association to ruby-mode
| Emacs Lisp | mit | tsonntag/dotemacs,tsonntag/dotemacs,tsonntag/dotemacs,tsonntag/dotemacs | |
06d54b58f2ea5c49507164d97e8837406484a274 | build/base16-zenburn-theme.el | build/base16-zenburn-theme.el | ;; base16-zenburn-theme.el -- A base16 colorscheme
;;; Commentary:
;; Base16: (https://github.com/chriskempson/base16)
;;; Authors:
;; Scheme: elnawe
;; Template: Kaleb Elwert <belak@coded.io>
;;; Code:
(require 'base16-theme)
(defvar base16-zenburn-colors
'(:base00 "#3f3f3f"
:base01 "#404040"
:base02 "#... | Add base16-zenburn... this feels sacrilegious | Add base16-zenburn... this feels sacrilegious
| Emacs Lisp | mit | belak/base16-emacs | |
42242c9248b665123ee8105fddbc0b8fa46df404 | emacs/init.el | emacs/init.el | (global-set-key (kbd "C-c l") 'org-store-link)
(global-set-key (kbd "C-c a") 'org-agenda)
(global-set-key (kbd "C-c c") 'org-capture)
| Add Emacs config: configure global Org keys | Add Emacs config: configure global Org keys
| Emacs Lisp | mit | raindev/dotfiles | |
827e785e6a9085eab3a27a3df9269dff32392c0f | config/language_meson.el | config/language_meson.el | ;;; package --- Summary
;;; Commentary:
;;; Code:
(add-hook 'meson-mode-hook 'company-mode)(add-hook 'meson-mode-hook 'company-mode)
(provide 'language_meson)
;;; language_meson ends here
| Use meson mode with company | Use meson mode with company
| Emacs Lisp | unlicense | schanur/emacs.d | |
d37ad5cd918a1c1e7d8584028a432947f5071962 | skewer-proxy.el | skewer-proxy.el | ;;; skewer-proxy.el --- proxy a website so that it can be skewered
;; This is free and unencumbered software released into the public domain.
;;; Commentary:
;; Due to same origin policy, simply including the skewer JavaScript
;; in a page is not enough to skewer that website. The page must be
;; served by Emacs. To... | Implement a transparent proxy, to defeat same origin policy. | Implement a transparent proxy, to defeat same origin policy.
| Emacs Lisp | unlicense | syohex/skewer-mode,syohex/skewer-mode,kostafey/skewer-mode,kostafey/skewer-mode,skeeto/skewer-mode,skeeto/skewer-mode,emacsmirror/skewer-mode,emacsmirror/skewer-mode | |
2f52c9e98e3cd5496d5f1c98e88816d6b4a1a724 | .dir-locals.el | .dir-locals.el | ;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")
((clojure-mode
(clojure-indent-style . :always-align)
(indent-tabs-mode . nil)
(fill-column . 80)))
| Add some default project settings for Emacs users | Add some default project settings for Emacs users
This ensure that everyone is using the same indentation style
and no tabs.
| Emacs Lisp | epl-1.0 | clojure-emacs/refactor-nrepl,clojure-emacs/refactor-nrepl | |
edd15e58db1500112aa37dfac16dbf526c729c58 | modules/init-company.el | modules/init-company.el | ;;;; company-mode
(require 'rtags)
(require 'company)
;; Turn on rtags completions
(setq rtags-completions-enabled t)
;; Turn on company mode everywhere
(global-company-mode)
;; Use ESC to escape company-complete (in addition to C-g)
(define-key company-active-map (kbd "<escape>") 'company-abort)
;; Key to force t... | ;;;; company-mode
(require 'rtags)
(require 'company)
(require 'diminish)
;; Turn on rtags completions
(setq rtags-completions-enabled t)
;; Turn on company mode everywhere
(global-company-mode)
;; Use ESC to escape company-complete (in addition to C-g)
(define-key company-active-map (kbd "<escape>") 'company-abort... | Clean up line mode for company | Clean up line mode for company
'company' is a bit too long to my taste. Let's use 'CA' which is
not only shorter, not only respects Complete Any but is an anagram
of 'AC' used by the competition a.k.a auto-complete.
| Emacs Lisp | mit | steve-downey/dot.emacs,fcassirer/dot.emacs,pkryger/exordium,jbibollet/exordium,philippe-grenet/exordium,psipika/exordium |
640e0c356bccfc966587d1bf4088771c92d499ca | emacs/python_elpy.emacs | emacs/python_elpy.emacs | ;; to install eply: pip install jedi flake8 autopep8 rope snakeviz
;; M-x package-refresh-contents
;; M-x package-install RET elpy RET
(setq user-mail-address "matthieu.garrigues@gmail.com")
(setq user-full-name "Matthieu Garrigues <matthieu.garrigues@gmail.com>")
(require 'package)
(add-to-list 'package-archives
... | Add python elpy only conf. | Add python elpy only conf.
| Emacs Lisp | mit | matt-42/configurations | |
ca69dd6e1c7cc8b4feab08f7c098c482ab48d1df | emacs/dot-emacs.d/private/local/conda/packages.el | emacs/dot-emacs.d/private/local/conda/packages.el | ;;; packages.el --- Conda Layer packages File for Spacemacs
;;
;; Author: James K. Glasbrenner <jglasbr2@gmu.edu>
;; URL: https://github.com/jkglasbrenner/dotfiles
;;
;; This file is not a part of GNU Emacs.
;;
;;; License: Unlicense
(setq conda-packages
'(
(conda :location elpa)
))
(defun conda/init-conda ... | Add custom layer for loading conda-mode | Add custom layer for loading conda-mode
| Emacs Lisp | unlicense | jkglasbrenner/dotfiles,jkglasbrenner/dotfiles,jkglasbrenner/dotfiles,jkglasbrenner/dotfiles,jkglasbrenner/dotfiles,jkglasbrenner/dotfiles | |
946f12f218e510b8f74d79c424347a8846d67a46 | ros_buildfarm/templates/snippet/scm_svn.xml.em | ros_buildfarm/templates/snippet/scm_svn.xml.em | <scm class="hudson.scm.SubversionSCM" plugin="subversion@@2.12.1">
<locations>
<hudson.scm.SubversionSCM_-ModuleLocation>
<remote>@ESCAPE(remote)</remote>
@[if local]@
<local>@ESCAPE(local)</local>
@[end if]@
<depthOption>infinity</depthOption>
<ignoreExternalsOption>false</ignoreExternals... | <scm class="hudson.scm.SubversionSCM" plugin="subversion@@2.13.1">
<locations>
<hudson.scm.SubversionSCM_-ModuleLocation>
<remote>@ESCAPE(remote)</remote>
@[if local]@
<local>@ESCAPE(local)</local>
@[end if]@
<depthOption>infinity</depthOption>
<ignoreExternalsOption>false</ignoreExternals... | Update subversion plugin to version 2.13.1 | Update subversion plugin to version 2.13.1
| EmberScript | apache-2.0 | ros-infrastructure/ros_buildfarm,ros-infrastructure/ros_buildfarm,ros-infrastructure/ros_buildfarm |
c16c751b9da92cbfacf7504f4b70b30205089a03 | modules/mod.em | modules/mod.em | scope {
l = 3
l += (!foo.bar[2]((2 ** 2 // 2), foo, 4))[2:@foo]
l -= 2
}
| scope {
l = 3 + 3 * 3
f = 'foo' * 2
o = true == true
o = 2 != 2 && 'foo' == 'foo'
}
| Clean up example to better test operator templating. At least for now.. | [REFACTOR] Clean up example to better test operator templating. At least for now..
| EmberScript | mit | BonsaiDen/emblem-lang |
db1b2f358a574190e99d472d5eb9bd8741aade9a | examples/linecount.em | examples/linecount.em | # Copyright 2011 Google Inc. All Rights Reserved.
# This file is available under the Apache license.
/$/ { # 4: match /$/
# 5: jnm 9
inc(line-count) # 6: inc line-count
} ... | # Copyright 2011 Google Inc. All Rights Reserved.
# This file is available under the Apache license.
/$/ {
inc(line-count)
}
| Remove bogus comments regarding instructions. | Remove bogus comments regarding instructions.
| EmberScript | apache-2.0 | 4honor/mtail,google/mtail,mindreframer/emtail,SuperQ/mtail,SuperQ/mtail,4honor/mtail,mindreframer/emtail,google/mtail |
84e032883ef0fd607f8a6b149cd9dedc56feb502 | test/system/tests/proximityTests/connectionTest.em | test/system/tests/proximityTests/connectionTest.em |
system.require('emUtil/util.em');
mTest = new UnitTest('connectionTest');
system.createPresence(
{
'space' : '12345678-1111-1111-1111-DEFA01759ACE',
'pos' : <0, 0, 0>,
'callback' : function() {
mTest.success('Finished');
system.killEntity();
}
}
);
|
system.require('emUtil/util.em');
mTest = new UnitTest('connectionTest');
var resultCount = function() {
var set = system.getProxSet(system.self);
var count = 0;
for (var x in set)
count++;
return count;
};
system.createPresence(
{
'space' : '12345678-1111-1111-1111-DEFA01759ACE'... | Make basic proximity connection test check for expected result set count after connection. | Make basic proximity connection test check for expected result set count after connection.
| EmberScript | bsd-3-clause | sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata |
a138cf04714a3e871d6ca9ff07c91f399d0f8b15 | gtk3/theme/settings.ini.em | gtk3/theme/settings.ini.em | ${
# These sizes are copied from gtk2 rc files ...
if scaling == "100":
icon_base = 11
else: # About 72% of the XO size, adjusted so that eg. toolbuttons work
icon_base = 8 # 7.92
icon_small = icon_base * 3
icon_large = icon_base * 5
}
[Settings]
gtk-auto-mnemonics = 1
gtk-menu-images = 1
gtk-... | ${
# These sizes are copied from gtk2 rc files ...
if scaling == "100":
icon_base = 11
else: # About 72% of the XO size, adjusted so that eg. toolbuttons work
icon_base = 8 # 7.92
icon_small = icon_base * 3
icon_large = icon_base * 5
}
[Settings]
gtk-auto-mnemonics = 1
gtk-menu-images = 1
gtk-... | Add setting to invoke page up/page down on scrollbars clicks | Add setting to invoke page up/page down on scrollbars clicks
The default value of 'gtk-primary-button-warps-slider' in GTK+3 is
True[1] and in GTK+2 is False[2]. This patch sets the setting to
False in GTK+3 to keep the same behaviour as before.
[1] http://developer.gnome.org/gtk3/stable/GtkSettings.html#GtkSettings... | EmberScript | apache-2.0 | godiard/sugar-artwork,sugarlabs/sugar-artwork,i5o/sugar-artwork,ceibal-tatu/sugar-artwork,sugarlabs/sugar-artwork,godiard/sugar-artwork,ceibal-tatu/sugar-artwork,godiard/sugar-artwork,gusDuarte/sugar-artwork,tchx84/debian-pkg-sugar-artwork,i5o/sugar-artwork,tchx84/debian-pkg-sugar-artwork,i5o/sugar-artwork,ceibal-tatu/... |
99241d04c8901a6231f71469fde05c64c3501e07 | liboh/plugins/js/scripts/test/testTimerRestore.em | liboh/plugins/js/scripts/test/testTimerRestore.em |
function funcCallback()
{
system.print('\n\nI got timed out\n\n');
}
var a = system.timeout(5,funcCallback);
var aAllData = a.getAllData();
a.clear();
function recreateA()
{
system.print('\n');
system.print(aAllData);
system.print('\n');
// system.print(aAllData.period);
// system.print(... | Test file to demonstrate that timer restore now works. | Test file to demonstrate that timer restore now works.
| EmberScript | bsd-3-clause | sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata | |
032275ec2f1c6bc379b0887c09b876232702fa47 | liboh/plugins/js/scripts/std/defaultAvatar.em | liboh/plugins/js/scripts/std/defaultAvatar.em | /* Sirikata
* default.em
*
* Copyright (c) 2011, Ewen Cheslack-Postava
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above c... | Add a default avatar script so its easy to get all the functionality provided by emerson without writing your own avatar script. | Add a default avatar script so its easy to get all the functionality provided by emerson without writing your own avatar script.
| EmberScript | bsd-3-clause | sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata | |
c32a997cccabea94956b10abb1ee9e7405992f2b | include/records.hrl | include/records.hrl |
-record(fa, {?ELEMENT_BASE(element_fa),
text="" :: text(),
body=" " :: body,
fa :: text() % Font awsume icon
}).
| -ifndef(nitrogen_fa_include).
-define(nitrogen_fa_include, 1).
-record(fa, {?ELEMENT_BASE(element_fa),
text="" :: text(),
body=" " :: body,
fa :: text() % Font awsume icon
}).
-endif.
| Add ifndef/endif pairs around include file | Add ifndef/endif pairs around include file
(To prevent conflicts if include file is included more than once).
| Erlang | mit | stuart-thackray/nitrogen_fa,stuart-thackray/nitrogen_fa |
f7d80e3cba0ee7d13b102175aa14c5dab8a18e79 | test/fn_string_tests.erl | test/fn_string_tests.erl | %% See LICENSE for licensing information.
%% -*- coding: utf-8 -*-
-module(fn_string_tests).
-include_lib("eunit/include/eunit.hrl").
%% API tests.
b_abs_test() ->
?assertMatch({where, _,
[{fn, "base", [{b_param,"b"}], 46}]},
s("58 where fun base.b = 46 end")).
n_abs_test() ->
?a... | %% See LICENSE for licensing information.
%% -*- coding: utf-8 -*-
-module(fn_string_tests).
-include_lib("eunit/include/eunit.hrl").
%% API tests.
b_abs_test_() ->
[?_assertMatch({where, _,
[{fn, "base", [{b_param,"b"}], 46}]},
s("58 where fun base.b = 46 end")),
?_assertMat... | Test function declaration more extensively | Test function declaration more extensively
| Erlang | apache-2.0 | esl/ice |
0b21de3d7f5be04d818f807d37a425f737c662fb | apps/chloe/src/chloe.erl | apps/chloe/src/chloe.erl | -module(chloe).
%% API
-export([
start/0,
stop/0
]).
%%--------------------------------------------------------------------
%% API
%%--------------------------------------------------------------------
start() ->
ok = application:start(inets),
application:start(chloe).
stop() ->
... | -module(chloe).
%% API
-export([
start/0,
stop/0
]).
%%--------------------------------------------------------------------
%% API
%%--------------------------------------------------------------------
start() ->
ensure_started(inets),
application:start(chloe).
stop() ->
applic... | Use ensure_started for safer starting | Use ensure_started for safer starting
| Erlang | mit | mashion/chloe,mashion/chloe,mashion/chloe |
1db90950fe966dac6a373b8a877dbefbaf8814ab | server/src/mzb_api_metrics.erl | server/src/mzb_api_metrics.erl | -module(mzb_api_metrics).
-export([get_metrics/5,
extract_metric_names/1]).
get_metrics(UserName, DirNode, Host, RemoteScriptPath, RemoteEnvPath) ->
[Res] = mzb_subprocess:remote_cmd(
UserName,
[Host],
io_lib:format("~s/mzbench/bin/metric_names.escript", [mzb_api... | -module(mzb_api_metrics).
-export([get_metrics/5,
extract_metric_names/1]).
get_metrics(UserName, DirNode, Host, RemoteScriptPath, RemoteEnvPath) ->
[Res] = mzb_subprocess:remote_cmd(
UserName,
[Host],
io_lib:format("~s/mzbench/bin/metric_names.escript", [mzb_api... | Fix function_clause on handling of empty list of metrics | Fix function_clause on handling of empty list of metrics
| Erlang | bsd-3-clause | machinezone/mzbench,MrAlone/mzbench,timofey-barmin/mzbench,machinezone/mzbench,timofey-barmin/mzbench,MrAlone/mzbench,timofey-barmin/mzbench,timofey-barmin/mzbench,MrAlone/mzbench,machinezone/mzbench,timofey-barmin/mzbench,MrAlone/mzbench,machinezone/mzbench,machinezone/mzbench,MrAlone/mzbench |
efada0993f19b406660f2796f9bd8ef018f3a112 | src/privatepaste_home.erl | src/privatepaste_home.erl | -module(privatepaste_home).
-behavior(cowboy_http_handler).
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
init(_Type, Req, _Opts) ->
{ok, Req, undefined_state}.
handle(Req, State) ->
{ok, Body} = index_dtl:render([]),
Headers = [{<<"Content-Type">>, <<"text/html">>}],
{ok, Req2} = ... | -module(privatepaste_home).
-behavior(cowboy_http_handler).
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
init(_Type, Req, _Opts) ->
{ok, Req, undefined_state}.
handle(Req, State) ->
{ok, Body} = base_dtl:render([]),
Headers = [{<<"Content-Type">>, <<"text/html">>}],
{ok, Req2} = c... | Update home to use base_dtl for now | Update home to use base_dtl for now
| Erlang | bsd-3-clause | gmr/privatepaste,Vicrelant/privatepaste,blindsighttf2/privatepaste |
586ae58f2092a043fbf76c8f19b557539cf6a038 | src/blank_page_app.erl | src/blank_page_app.erl | %% Feel free to use, reuse and abuse the code in this file.
%% @private
-module(blank_page_app).
-behaviour(application).
%% API.
-export([start/2]).
-export([stop/1]).
%% API.
start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
{"/", toppage_handler, []}
]}
]),
{ok, _} = cowboy:start_http(h... | %% Feel free to use, reuse and abuse the code in this file.
%% @private
-module(blank_page_app).
-behaviour(application).
%% API.
-export([start/2]).
-export([stop/1]).
%% API.
start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
{"/[...]", toppage_handler, []}
]}
]),
{ok, _} = cowboy:start_h... | Make all path route to blank response | Make all path route to blank response
| Erlang | mit | linc01n/blank_page |
fbaf4210a0d276be98bed76a7295334a50b7a4b3 | lib/test_server/include/test_server.hrl | lib/test_server/include/test_server.hrl | %%
%% %CopyrightBegin%
%%
%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public Lice... | %%
%% %CopyrightBegin%
%%
%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public Lice... | Replace usage of erlang:now() in line-tracing | Replace usage of erlang:now() in line-tracing
| Erlang | apache-2.0 | RoadRunnr/otp,derek121/otp,riverrun/otp,bugs-erlang-org/otp,fenollp/otp,vinoski/otp,enikki/otp,yangchengjian/otp,jj1bdx/otp,dgud/otp,riverrun/otp,lianghaivv/otp,vic/otp,bernardd/otp,saleyn/otp,dumbbell/otp,g-andrade/otp,potatosalad/otp,beni55/otp,enikki/otp,RaimoNiskanen/otp,GinjaNinja32/otp,bjorng/otp,awetzel/otp,bern... |
e5aa7db9b112402a1a10c383c86395bba7752e83 | src/cache_adapters/boss_cache_adapter_memcached_bin.erl | src/cache_adapters/boss_cache_adapter_memcached_bin.erl | -module(boss_cache_adapter_memcached_bin).
-behaviour(boss_cache_adapter).
-export([init/1, start/0, start/1, stop/1]).
-export([get/3, set/5, delete/3]).
start() ->
start([]).
start(_Options) ->
{ok, undefined}.
stop(_Conn) ->
erlmc:quit().
init(Options) ->
CacheServers = proplists:get_value(cache... | -module(boss_cache_adapter_memcached_bin).
-behaviour(boss_cache_adapter).
-export([init/1, start/0, start/1, stop/1]).
-export([get/3, set/5, delete/3]).
start() ->
start([]).
start(_Options) ->
{ok, undefined}.
stop(_Conn) ->
erlmc:quit().
init(Options) ->
CacheServers = proplists:get_value(cache... | Return {ok, undefined} from Memcache adapter | Return {ok, undefined} from Memcache adapter
| Erlang | mit | QBkira/boss_db,mihawk/boss_db,badubizzle/boss_db |
d6102924fd215183fce52a62a907d0940e42384a | largest-series-product/largest_series_product_tests.erl | largest-series-product/largest_series_product_tests.erl | -module( largest_series_product_tests ).
-include_lib("eunit/include/eunit.hrl").
three_test() -> ?assert( 504 =:= largest_series_product:from_string("0123456789", 3) ).
five_test() -> ?assert( 15120 =:= largest_series_product:from_string("0123456789", 5) ).
six_test() -> ?assert( 23520 =:= largest_series_product:fr... | -module( largest_series_product_tests ).
-include_lib("eunit/include/eunit.hrl").
three_test() -> ?assert( 504 =:= largest_series_product:from_string("0123456789", 3) ).
five_test() -> ?assert( 15120 =:= largest_series_product:from_string("0123456789", 5) ).
six_test() -> ?assert( 23520 =:= largest_series_product:fr... | Add tests with empty products | largest-series-product: Add tests with empty products
The empty product is 1, the identity element under multiplication.
These are consistent with the values defined in
https://github.com/exercism/x-common/blob/master/largest-series-product.json
| Erlang | mit | tmcgilchrist/xerlang,NobbZ/xerlang,exercism/xerlang |
1f0bddff927b5143baabbab45562b16916f5f74d | tests/dk_stem_SUITE.erl | tests/dk_stem_SUITE.erl | -module(dk_stem_SUITE).
-include_lib("common_test/include/ct.hrl").
-compile(export_all).
-define(value(Key,Config), proplists:get_value(Key,Config)).
all() ->
[{group, integration_tests}].
groups() ->
[{integration_tests, [test_en, test_nl]}].
test_en(Config) ->
vocab_stemmed("en", Config),
ok.
t... | -module(dk_stem_SUITE).
-include_lib("common_test/include/ct.hrl").
-compile(export_all).
-define(value(Key,Config), proplists:get_value(Key,Config)).
all() ->
[{group, integration_tests}].
groups() ->
[{integration_tests, [test_en, test_nl]}].
test_en(Config) ->
vocab_stemmed("en", Config),
ok.
t... | Use variable instead of `apply` | Use variable instead of `apply`
| Erlang | bsd-3-clause | moretea/doko,moretea/doko |
94f3fee5da135fe7aba9d18ab8ccf231f300e1d4 | include/etorrent_chunk.hrl | include/etorrent_chunk.hrl | %% A mapping containing the chunks tracking
-record(chunk, {idt, % {id, piece_number, state} tuple
% state is fetched | {assigned, Pid} | not_fetched,
chunks}). % {offset, size}
| %% A mapping containing the chunks tracking
-record(chunk, {idt :: {integer() | '_' | '$1',
integer() | '_' | '$1',
not_fetched | fetched | {assigned, pid() | '_'} | '_'},
chunks :: [integer() | {integer(), integer(), [term()]}] | '_' | '$2'}).
| Write down a specification for the chunk_tbl. | Write down a specification for the chunk_tbl.
| Erlang | bsd-2-clause | jlouis/etorrent,beni55/etorrent |
c1a4bf458eff20ee6a5987e4a8d79961e1f5a23a | test/src/autocluster_sup_tests.erl | test/src/autocluster_sup_tests.erl | -module(autocluster_sup_tests).
-include_lib("eunit/include/eunit.hrl").
start_link_test_() ->
{
foreach,
fun() ->
meck:new(supervisor, [passthrough, unstick])
end,
fun(_) ->
meck:unload(supervisor)
end,
[
{
"supervisor start_link", fun() ->
meck:expect(su... | -module(autocluster_sup_tests).
-include_lib("eunit/include/eunit.hrl").
start_link_test_() ->
{
foreach,
fun() ->
meck:new(supervisor, [passthrough, unstick])
end,
fun(_) ->
meck:unload(supervisor)
end,
[
{
"supervisor start_link", fun() ->
meck:expect(su... | Validate the use of supervisor | Validate the use of supervisor
| Erlang | bsd-3-clause | alanprot/rabbitmq-autocluster,rabbitmq/rabbitmq-autocluster,aweber/rabbitmq-autocluster |
1d0db1a0d215d5443e38f68bb680035bece3a628 | apps/aesophia/test/aeso_compiler_tests.erl | apps/aesophia/test/aeso_compiler_tests.erl | %%% -*- erlang-indent-level:4; indent-tabs-mode: nil -*-
%%%-------------------------------------------------------------------
%%% @copyright (C) 2018, Aeternity Anstalt
%%% @doc Test Sophia language compiler.
%%%
%%% @end
%%%-------------------------------------------------------------------
-module(aeso_compiler_te... | %%% -*- erlang-indent-level:4; indent-tabs-mode: nil -*-
%%%-------------------------------------------------------------------
%%% @copyright (C) 2018, Aeternity Anstalt
%%% @doc Test Sophia language compiler.
%%%
%%% @end
%%%-------------------------------------------------------------------
-module(aeso_compiler_te... | Include fundme example among compiler tests | Include fundme example among compiler tests
... so to ease check that its copy as [example in protocol
repo](https://github.com/aeternity/protocol/blob/epoch-v0.17.0/contracts/sophia.md#examples)
compiles.
| Erlang | isc | aeternity/epoch,aeternity/epoch,aeternity/epoch,aeternity/epoch |
7e0e7376c0f362f969d0f7a268f9281462ec44b0 | sum-of-multiples/sum_of_multiples_tests.erl | sum-of-multiples/sum_of_multiples_tests.erl | -module(sum_of_multiples_tests).
-import(sum_of_multiples, [sumOfMultiplesDefault/1, sumOfMultiples/2]).
-include_lib("eunit/include/eunit.hrl").
sum_to_1_test() ->
?assertEqual(0, sumOfMultiplesDefault(1)).
sum_to_3_test() ->
?assertEqual(3, sumOfMultiplesDefault(4)).
sum_to_10_test() ->
?assertEqual(23, sum... | -module(sum_of_multiples_tests).
-import(sum_of_multiples, [sumOfMultiplesDefault/1, sumOfMultiples/2]).
-include_lib("eunit/include/eunit.hrl").
sum_to_1_test() ->
?assertEqual(0, sumOfMultiplesDefault(1)).
sum_to_3_test() ->
?assertEqual(3, sumOfMultiplesDefault(4)).
sum_to_10_test() ->
?assertEqual(23, sum... | Add missing test to sum-of-multiples exercise | Add missing test to sum-of-multiples exercise | Erlang | mit | tmcgilchrist/xerlang,exercism/xerlang,NobbZ/xerlang |
87e696d170d29e921ee5310a6f3bf43ac3289174 | apps/aecore/src/aecore_sup.erl | apps/aecore/src/aecore_sup.erl | -module(aecore_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
-include("common.hrl").
-include("blocks.hrl").
-define(SERVER, ?MODULE).
-define(CHILD(Mod,N,Type), {Mod,{Mod,start_link,[]},permanent,N,Type,[Mod]}).
-define(CHILD(Mod,N,Type,Params), {Mod,{Mod... | -module(aecore_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
-include("common.hrl").
-include("blocks.hrl").
-define(SERVER, ?MODULE).
-define(CHILD(Mod,N,Type), {Mod,{Mod,start_link,[]},permanent,N,Type,[Mod]}).
-define(CHILD(Mod,N,Type,Params), {Mod,{Mod... | Fix race between chain and keys services when starting with persisted chain | Fix race between chain and keys services when starting with persisted chain
Start process responsible for keys (`aec_keys`) first because it is
used by (at least):
* Chain process (`aec_chain`/`aec_chain_server` - see module
`aec_chain_state`);
* Mempool process (`aec_tx_pool`).
In particular, chain process needs... | Erlang | isc | aeternity/epoch,aeternity/epoch,aeternity/epoch,aeternity/epoch |
861694465fb131a0ab589f42243b8348259f838e | src/mt_index.erl | src/mt_index.erl | %% -*- mode: nitrogen -*-
-module (mt_index).
-export([
main/0,
title/0,
body/0,
event/1,
author/0,
url/0
]).
-include_lib("nitrogen_core/include/wf.hrl").
-include_lib("metalkia_core/include/mt_log.hrl").
main() -> #template { file="./site/templates/metalkia/bare.html" }.
title() -> "Metalkia".
auth... | %% -*- mode: nitrogen -*-
-module (mt_index).
-export([
main/0,
title/0,
body/0,
event/1,
author/0,
url/0
]).
-include_lib("nitrogen_core/include/wf.hrl").
-include_lib("metalkia_core/include/mt_log.hrl").
main() -> #template { file="./site/templates/metalkia/bare.html" }.
title() -> "Metalkia".
auth... | Add link to Twitter login | Add link to Twitter login
| Erlang | mit | metachord/metalkia_web_site,metachord/metalkia_web_site |
7b4ceecfdbf60be0d341319f4a675f08951fe8c1 | src/rebar_prv_state.erl | src/rebar_prv_state.erl | %% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 et
-module(rebar_prv_state).
-behaviour(provider).
-export([init/1,
do/1,
format_error/1]).
-include("rebar.hrl").
-define(PROVIDER, state).
-define(DEPS, []).
%% ============================================================... | %% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 et
-module(rebar_prv_state).
-behaviour(provider).
-export([init/1,
do/1,
format_error/1]).
-include("rebar.hrl").
-define(PROVIDER, state).
-define(DEPS, []).
%% ============================================================... | Change output to use ?CONSOLE marco | Change output to use ?CONSOLE marco
| Erlang | apache-2.0 | rebar/rebar3,saleyn/rebar3,lrascao/rebar3,djnym/rebar3,norton/rebar3,ferd/rebar3,benoitc/rebar3,rebar/rebar3,benoitc/rebar3,erlang/rebar3,tsloughter/rebar3,vladdu/rebar3 |
e9b9a207c2c6c91a474e2a67bd750450784b757d | src/elements/element_upload.erl | src/elements/element_upload.erl | -module(element_upload).
-compile(export_all).
-include_lib("nitro/include/nitro.hrl").
render_element(#upload{id=Id} = U) ->
Uid = case Id of undefined -> wf:temp_id(); I -> I end,
bind(ftp_open, click, "qi('upload').click(); e.preventDefault();"),
bind(ftp_start, click, "ftp.start();"),
bind(ftp_s... | -module(element_upload).
-compile(export_all).
-include_lib("nitro/include/nitro.hrl").
render_element(#upload{id=Id} = U) ->
Uid = case Id of undefined -> wf:temp_id(); I -> I end,
bind(ftp_open, click, "qi('upload').click(); e.preventDefault();"),
bind(ftp_start, click, "ftp.start();"),
bind(ftp_s... | Fix for autostart option in ftp.js | Fix for autostart option in ftp.js | Erlang | mit | naga-framework/nitro |
684d6b02ade4f1c6d43d0353e9bbe9668b5b0973 | src/ev8cache.erl | src/ev8cache.erl | -module(ev8cache).
-export([
start/0,
eval_file/2
]).
start() ->
ets:new(ev8cache_lookup, [set, public, named_table, {read_concurrency, true}]).
eval_file(Context, File) ->
eval_file(ev8txn:vm(Context), Context, File).
eval_file({ok, Vm}, Context, File) ->
try_cache(Vm, Context, File);
eval_file({error,... | -module(ev8cache).
-export([
start/0,
eval_file/2,
insert/3,
lookup/2
]).
start() ->
ets:new(ev8cache_lookup, [set, public, named_table, {read_concurrency, true}]).
eval_file(Context, File) ->
eval_file(ev8txn:vm(Context), Context, File).
eval_file({error, not_found}, _Context, _File) ->
{error, bad... | Make caching more accessible to other ev8 modules. | Make caching more accessible to other ev8 modules.
| Erlang | mit | chromaticbum/erlang_v8,chromaticbum/erlang_v8,chromaticbum/erlang_v8 |
958ed6ebdaa14863b18454fca3ee4f4b3d82b5f9 | src/element_fa.erl | src/element_fa.erl | %% vim: ts=4 sw=4 et
-module (element_fa).
-include_lib ("nitrogen_core/include/wf.hrl").
-include("records.hrl").
-export([
reflect/0,
render_element/1
]).
reflect() -> record_info(fields, fa).
-spec render_element(#fa{}) -> body().
render_element(_Record = #fa{text = Text,
bod... | %% vim: ts=4 sw=4 et
-module (element_fa).
-include_lib ("nitrogen_core/include/wf.hrl").
-include("records.hrl").
-export([
reflect/0,
render_element/1
]).
reflect() -> record_info(fields, fa).
-spec render_element(#fa{}) -> body().
render_element(_Record = #fa{text = Text,
bod... | Add Htmlid and Style attributes | Add Htmlid and Style attributes
| Erlang | mit | stuart-thackray/nitrogen_fa,stuart-thackray/nitrogen_fa |
15a67bbda88997e30974e207fe2fe6d44d1922f8 | include/partisan.hrl | include/partisan.hrl | -define(SET, riak_dt_orswot).
-define(APP, partisan).
-define(PEER_IP, {127,0,0,1}).
-define(PEER_PORT, 9000).
-define(PEER_SERVICE_SERVER, partisan_peer_service_server).
-define(FANOUT, 5).
-define(GOSSIP_INTERVAL, 300).
-type node_spec() :: {node(), inet:ip_address(), non_neg_integer()}.
| -define(SET, riak_dt_orswot).
-define(APP, partisan).
-define(PEER_IP, {127,0,0,1}).
-define(PEER_PORT, 9000).
-define(PEER_SERVICE_SERVER, partisan_peer_service_server).
-define(FANOUT, 5).
%% @todo Reduce me.
-define(GOSSIP_INTERVAL, 300).
-type node_spec() :: {node(), inet:ip_address(), non_neg_integer()}.
| Add comment to remember to change TTL. | Add comment to remember to change TTL. | Erlang | apache-2.0 | lasp-lang/partisan |
60dd9280ebf24ab733328eb2d5d15b79fa1fc1c1 | src/channels/slack_channel.erl | src/channels/slack_channel.erl | -module(slack_channel).
-export([handle/2]).
handle(Config, Message) ->
Targets = maps:get(channels, Config),
HookUrl = maps:get(url, Config),
%% FIXME emoji and username should be default when blank
BasePayload = #{
text => Message,
username => maps:get(username, Config, <<"Holiday Remind... | -module(slack_channel).
-export([handle/2]).
handle(Config, Message) ->
Targets = maps:get(channels, Config),
HookUrl = maps:get(url, Config),
BasePayload = #{
text => Message,
username => get_not_empty(username, Config, <<"Holiday Reminder">>),
icon_emoji => get_not_empty(emoji, Config... | Use default slack config when values are empty | Use default slack config when values are empty
| Erlang | mit | lambdaclass/holiday_ping |
be7544d3dce0eb8871f8419e0eb64ea1c6782a93 | src/reia/reia_operators.erl | src/reia/reia_operators.erl | -module(reia_operators).
-export([ast/2, ast/3]).
ast('-' = Op, Ast) ->
{op, 1, Op, {integer, 1, 0}, Ast}.
%ast('~' = Op, Ast) ->
% erl_syntax:prefix_expr(erl_syntax:operator('bnot'), Ast).
ast('*' = Op, Ast1, Ast2) ->
{op, 1, Op, Ast1, Ast2};
ast('**', Ast1, Ast2) ->
{call,1,{remote,1,{atom,1,math},{atom,1,... | -module(reia_operators).
-export([ast/2, ast/3]).
ast('-' = Op, Ast) ->
{op, 1, Op, Ast}.
%ast('~' = Op, Ast) ->
% erl_syntax:prefix_expr(erl_syntax:operator('bnot'), Ast).
ast('*' = Op, Ast1, Ast2) ->
{op, 1, Op, Ast1, Ast2};
ast('**', Ast1, Ast2) ->
{call,1,{remote,1,{atom,1,math},{atom,1,pow}},[Ast1, Ast2... | Use proper unary for negative numbers in Erlang AST | Use proper unary for negative numbers in Erlang AST
| Erlang | mit | tarcieri/reia,beni55/reia,beni55/reia,tarcieri/reia |
edbbdcbb388d3b4446fa88d3a248962e1fd2ff4c | src/rabbit_auth_backend_kerberos.erl | src/rabbit_auth_backend_kerberos.erl | -module(rabbit_auth_backend_kerberos).
-include_lib("rabbit_common/include/rabbit.hrl").
-behaviour(rabbit_auth_backend).
-export([description/0, check_user_login/2, check_vhost_access/2, check_resource_access/3]).
description() ->
[{name, <<"Kerberos">>},
{description, <<"Kerberos authentication">>}].
check_... | -module(rabbit_auth_backend_kerberos).
-include_lib("rabbit_common/include/rabbit.hrl").
-behaviour(rabbit_auth_backend).
-export([description/0, check_user_login/2, check_vhost_access/2, check_resource_access/3]).
description() ->
[{name, <<"Kerberos">>},
{description, <<"Kerberos authentication">>}].
check_... | Use correct reply for check_user_login | Use correct reply for check_user_login
| Erlang | bsd-3-clause | simmel/rabbitmq-auth-backend-kerberos |
f3cff3d290c96e4aaca1816d3cd7ad5bf7d6ec9b | test/mousetrap_app_tests.erl | test/mousetrap_app_tests.erl | -module(mousetrap_app_tests).
-include_lib("eunit/include/eunit.hrl").
fixture_startup_test() ->
application:set_env(mousetrap, slack_token, "test_token"),
meck:expect(notification_library, notify, 1, {ok, 200, [long_list]}).
startup_message_sent_test() ->
mousetrap_app:start("", ""),
?assert(meck:called(not... | -module(mousetrap_app_tests).
-include_lib("eunit/include/eunit.hrl").
fixture_startup_test() ->
application:set_env(mousetrap, slack_token, "test_token"),
meck:expect(notification_library, notify, 1, {ok, 200, [long_list]}),
meck:expect(mousetrap_sup, start_link, 0, {ok, pid}).
start_sends_notification_test()... | Test start of mousetrap supervisor. | Test start of mousetrap supervisor.
| Erlang | apache-2.0 | DonBranson/BeagleBone-Black-Mousetrap |
6b0556861308bad2f8ebb60ce81074e2185dd05a | src/elements/html5/element_time.erl | src/elements/html5/element_time.erl | % vim: sw=4 ts=4 et ft=erlang
% Nitrogen Web Framework for Erlang
% See MIT-LICENSE for licensing information.
-module (element_time).
-include("wf.hrl").
-export([
reflect/0,
render_element/1
]).
-spec reflect() -> [atom()].
reflect() -> record_info(fields, time).
-spec render_element(#time{}) -> body().
re... | % vim: sw=4 ts=4 et ft=erlang
% Nitrogen Web Framework for Erlang
% See MIT-LICENSE for licensing information.
-module (element_time).
-include("wf.hrl").
-export([
reflect/0,
render_element/1
]).
-spec reflect() -> [atom()].
reflect() -> record_info(fields, time).
-spec render_element(#time{}) -> body().
re... | Change to the way time is outputed | Change to the way time is outputed
| Erlang | mit | stuart-thackray/nitrogen_core,stuart-thackray/nitrogen_core,stuart-thackray/nitrogen_core |
6192286d7f06d55dae14e81a98236dd8107d98f3 | examples/accelerando/accelerando.erl | examples/accelerando/accelerando.erl | -module(accelerando).
% API
-export([run/0]).
-compile(export_all).
%--- API -----------------------------------------------------------------------
run() ->
application:start(grisp),
spawn_link(fun() -> process() end).
%--- Internal ------------------------------------------------------------------
proce... | -module(accelerando).
% API
-export([run/0]).
-compile(export_all).
%--- API -----------------------------------------------------------------------
run() ->
application:start(grisp),
spawn_link(fun() -> process() end).
%--- Internal ------------------------------------------------------------------
proce... | Use both LEDs for Accelerando demo | Use both LEDs for Accelerando demo
| Erlang | apache-2.0 | grisp/grisp,ThomasArts/grisp,grisp/grisp,ThomasArts/grisp |
d0f07571356730e7674ad6519cdee0ce014c9fe7 | src/erlcfg_data.erl | src/erlcfg_data.erl | -module(erlcfg_data, [Node]).
-export([
raw/0,
get/1
]).
raw() ->
Node.
get(Key) ->
erlcfg_node:get(Node, Key).
| -module(erlcfg_data, [Node]).
-export([
raw/0,
get/1
]).
raw() ->
Node.
get(Key) ->
convert(erlcfg_node:get(Node, Key)).
convert({value, Value}) when is_binary(Value) ->
{value, binary_to_list(Value)};
convert(Value) ->
Value.
| Convert <<"A string as binary">> back into "A string as binary" | Convert <<"A string as binary">> back into "A string as binary"
All tests pass... whoopee!!!
| Erlang | bsd-3-clause | saleyn/erlcfg |
0f1df270c17d2c524005cbd2bdfc29a19660f8cf | src/rebar_prv_state.erl | src/rebar_prv_state.erl | %% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 et
-module(rebar_prv_state).
-behaviour(provider).
-export([init/1,
do/1,
format_error/1]).
-include("rebar.hrl").
-define(PROVIDER, state).
-define(DEPS, []).
%% ============================================================... | %% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 et
-module(rebar_prv_state).
-behaviour(provider).
-export([init/1,
do/1,
format_error/1]).
-include("rebar.hrl").
-define(PROVIDER, state).
-define(DEPS, []).
%% ============================================================... | Make state provider {bare, false} | Make state provider {bare, false}
| Erlang | apache-2.0 | ferd/rebar3,tsloughter/rebar3,benoitc/rebar3,norton/rebar3,djnym/rebar3,rebar/rebar3,benoitc/rebar3,lrascao/rebar3,erlang/rebar3,rebar/rebar3,vladdu/rebar3,saleyn/rebar3 |
2e1086bcdfc486e7e4f8470e05a3a5d7ed619ebc | services/service_goldenage_userinfo.erl | services/service_goldenage_userinfo.erl | -module(service_goldenage_userinfo).
-svc_needauth(true).
-export([process_get/2, info/2]).
-include_lib("zotonic.hrl").
process_get(_, Context) ->
info(Context#context.user_id, Context).
info(UserId, Context) ->
ga_util:rsc_json(UserId, [title, email, image], Context).
| -module(service_goldenage_userinfo).
-svc_needauth(true).
-export([process_get/2, info/2]).
-include_lib("zotonic.hrl").
process_get(_, Context) ->
info(Context#context.user_id, Context).
info(UserId, Context) ->
ga_util:rsc_json(UserId, [title, email, image, {edge, likes}], Context).
| Add liked cards to user info | Add liked cards to user info
| Erlang | mit | arjan/goldenage-backend |
f4d0613e53b0df0a0b5de1838a0c7d84ca7565da | test/sd_notify_test.erl | test/sd_notify_test.erl | -module(sd_notify_test).
-include_lib("eunit/include/eunit.hrl").
sd_notify_test_() ->
sd_notify_test_local(erlang:system_info(otp_release)).
sd_notify_test_local("19") ->
{ok, CWD} = file:get_cwd(),
FakeNotifyUnixSockName = CWD ++ "/fake-notify-udp-sock-" ++ integer_to_list(erlang:phash2(make_ref())),
TestMess... | -module(sd_notify_test).
-include_lib("eunit/include/eunit.hrl").
sd_notify_test_() ->
sd_notify_test_local(erlang:system_info(otp_release)).
sd_notify_test_local("19") ->
{ok, CWD} = file:get_cwd(),
FakeNotifyUnixSockName = CWD ++ "/fake-notify-udp-sock-" ++ integer_to_list(erlang:phash2(make_ref())),
{ok, Fak... | Move test message creation to where it belongs | Move test message creation to where it belongs
Signed-off-by: Peter Lemenkov <2f981fc861bda8c748898150c942841af4296212@redhat.com>
| Erlang | mit | lemenkov/erlang-sd_notify |
378420284310ae570513edc02e017d2c1ecd1599 | src/escalus_story.erl | src/escalus_story.erl | -module(escalus_story).
% Public API
-export([story/3]).
-include_lib("test_server/include/test_server.hrl").
%%--------------------------------------------------------------------
%% Public API
%%--------------------------------------------------------------------
story(Config, ResourceCounts, Test) ->
UserSpe... | -module(escalus_story).
% Public API
-export([story/3]).
-include_lib("test_server/include/test_server.hrl").
%%--------------------------------------------------------------------
%% Public API
%%--------------------------------------------------------------------
story(Config, ResourceCounts, Test) ->
UserSpe... | Add random tail to client's resources | Add random tail to client's resources
| Erlang | apache-2.0 | woowinc/escalus,esl/escalus,wcy123/escalus,sameroom/escalus,Nyco/escalus |
b1dd3f6638b663b75a58fcb7f2b781eaa9250fa9 | bench/basho_bench_driver_moss.erl | bench/basho_bench_driver_moss.erl | %% -------------------------------------------------------------------
%%
%% Copyright (c) 2007-2011 Basho Technologies, Inc. All Rights Reserved.
%%
%% -------------------------------------------------------------------
-module(basho_bench_driver_moss).
-export([new/1,
run/4]).
-include("basho_bench.hrl")... | %% -------------------------------------------------------------------
%%
%% Copyright (c) 2007-2011 Basho Technologies, Inc. All Rights Reserved.
%%
%% -------------------------------------------------------------------
-module(basho_bench_driver_moss).
-export([new/1,
run/4]).
-include("basho_bench.hrl")... | Add a client id to state | Add a client id to state
AZ918
| Erlang | apache-2.0 | GabrielNicolasAvellaneda/riak_cs,basho/riak_cs,sdebnath/riak_cs,dragonfax/riak_cs,yangchengjian/riak_cs,laurenrother/riak_cs,dragonfax/riak_cs,basho/riak_cs_lfs,sdebnath/riak_cs,basho/riak_cs,yangchengjian/riak_cs,basho/riak_cs_report,basho/riak_cs,GabrielNicolasAvellaneda/riak_cs,GabrielNicolasAvellaneda/riak_cs,sdebn... |
5fd5c750ba508d7981b1d031bf42faf8cddcba9d | src/riak_bench_keygen.erl | src/riak_bench_keygen.erl | %% -------------------------------------------------------------------
%%
%% riak_bench: Benchmarking Suite for Riak
%%
%% Copyright (c) 2009 Basho Techonologies
%%
%% This file is provided to you under the Apache License,
%% Version 2.0 (the "License"); you may not use this file
%% except in compliance with the Licens... | %% -------------------------------------------------------------------
%%
%% riak_bench: Benchmarking Suite for Riak
%%
%% Copyright (c) 2009 Basho Techonologies
%%
%% This file is provided to you under the Apache License,
%% Version 2.0 (the "License"); you may not use this file
%% except in compliance with the Licens... | Add non-binary encode uniform int keygen | Add non-binary encode uniform int keygen
| Erlang | apache-2.0 | ricardobcl/basho_bench,basho/basho_bench,mrallen1/basho_bench,mrallen1/basho_bench,basho/basho_bench,SyncFree/basho_bench,linearregression/basho_bench,GabrielNicolasAvellaneda/basho_bench,windkit/basho_bench,linearregression/basho_bench,SyncFree/basho_bench,basho/basho_bench,leo-project/basho_bench,GabrielNicolasAvella... |
044978ff64679fee4e4c2f7c0c35fa0325a0c67d | bowling/erlang/game_happy.erl | bowling/erlang/game_happy.erl | %% Calculate score for bowling game
%% Assumes valid and complete input
-module(game_happy).
-export([score/1]).
score(Rolls) -> frame(Rolls, 1, 0).
% Game complete.
frame(_BonusRolls, 11, Score) -> Score;
%% Strike.
frame([10|Rest], Frame, Score) ->
frame(Rest, Frame + 1, Score + 10 + strike_bonus(Rest));
%% S... | %% Calculate score for bowling game
%% Assumes valid and complete input
-module(game_happy).
-export([score/1]).
score(Rolls) -> frame(1, 0, Rolls).
% Game complete.
frame(11, Score, _BonusRolls) -> Score;
%% Strike.
frame(Frame, Score, [10|Rest]) ->
frame(Frame + 1, Score + 10 + strike_bonus(Rest), Rest);
%% S... | Change parameter order to match Erlang idiom | Change parameter order to match Erlang idiom
| Erlang | mit | bluegraybox/examples,bluegraybox/examples,bluegraybox/examples,bluegraybox/examples,bluegraybox/examples,bluegraybox/examples |
7e6c02cf58d5bff0fda08785fcbd4b6c4b3a00b6 | src/couch_event_sup2.erl | src/couch_event_sup2.erl | % Licensed under the Apache License, Version 2.0 (the "License"); you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% http://www.apache.org/licenses/LICENSE-2.0
%
% Unless required by applicable law or agreed to in writing, software
% distributed under the ... | % Licensed under the Apache License, Version 2.0 (the "License"); you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% http://www.apache.org/licenses/LICENSE-2.0
%
% Unless required by applicable law or agreed to in writing, software
% distributed under the ... | Fix callback module name for couch_event_registry | Fix callback module name for couch_event_registry
| Erlang | apache-2.0 | fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb |
2a7b5e3476d5850366fc68ce0275c6f7ff6c2788 | apps/aecontract/src/aect_state_tree.erl | apps/aecontract/src/aect_state_tree.erl | %%%-------------------------------------------------------------------
%%% @copyright (C) 2017, Aeternity Anstalt
%%% @doc
%%% ADT for keeping the state of contracts
%%% @end
%%%-------------------------------------------------------------------
-module(aect_state_tree).
%% API
-export([ empty/0
, insert_cont... | %%%-------------------------------------------------------------------
%%% @copyright (C) 2017, Aeternity Anstalt
%%% @doc
%%% ADT for keeping the state of contracts
%%% @end
%%%-------------------------------------------------------------------
-module(aect_state_tree).
%% API
-export([ empty/0
, insert_cont... | Set up contract state tree representation | Set up contract state tree representation
| Erlang | isc | aeternity/epoch,aeternity/epoch,aeternity/epoch,aeternity/epoch |
e57f00c813a4e58a294f528a4382997fa8b3175a | ucengine/src/helpers/unicode_helpers.erl | ucengine/src/helpers/unicode_helpers.erl | -module(unicode_helpers).
-export([normalize_unicode/1]).
% Convert strange unicode character like e' to é
normalize_unicode(Input) -> unicode:characters_to_list(binary:list_to_bin(Input), unicode).
| %%
%% U.C.Engine - Unified Colloboration Engine
%% Copyright (C) 2011 af83
%%
%% This program is free software: you can redistribute it and/or modify
%% it under the terms of the GNU Affero General Public License as published by
%% the Free Software Foundation, either version 3 of the License, or
%% (at your opti... | Add boilerplate on top of the file. | Add boilerplate on top of the file.
Signed-off-by: François de Metz <5187da0b934cc25eb2201a3ec9206c24b13cb23b@2metz.fr>
| Erlang | agpl-3.0 | stormz/ucengine,stormz/ucengine,stormz/ucengine,AF83/ucengine,AF83/ucengine,stormz/ucengine,AF83/ucengine,AF83/ucengine,stormz/ucengine |
45c12601737635e8d786251c1cc74ffdf33fd681 | erlang/apps/frontend/src/frontend_app.erl | erlang/apps/frontend/src/frontend_app.erl | -module(frontend_app).
-behaviour(application).
%% API.
-export([start/2]).
-export([stop/1]).
%% API.
start(_Type, _Args) ->
Dispatch = frontend:dispatchers(),
{ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [
{env, [{dispatch, Dispatch}]}
]),
frontend_sup:start_link().
stop(_State) ->
ok.
| -module(frontend_app).
-behaviour(application).
%% API.
-export([start/2]).
-export([stop/1]).
%% API.
start(_Type, _Args) ->
Dispatch = frontend:dispatchers(),
{ok, Port} = application:get_env(port),
{ok, _} = cowboy:start_http(http, 100, [{port, Port}], [
{env, [{dispatch, Dispatch}]}
]),
frontend_sup:st... | Use the application variable instead of hard coding the port. | Use the application variable instead of hard coding the port.
| Erlang | bsd-3-clause | AeroNotix/querl |
ab295bed8c79cd002ea10e7e3e35173c5178509f | src/boss/compiler_adapters/boss_compiler_adapter_lfe.erl | src/boss/compiler_adapters/boss_compiler_adapter_lfe.erl | -module(boss_compiler_adapter_lfe).
-compile(export_all).
file_extensions() -> ["lfe"].
controller_module(AppName, Controller) -> lists:concat([AppName, "_", Controller, "_controller"]).
module_name_for_file(_AppName, File) -> filename:basename(File, ".lfe").
compile_controller(File, Options) ->
do_compile(File... | -module(boss_compiler_adapter_lfe).
-compile(export_all).
file_extensions() -> ["lfe"].
controller_module(AppName, Controller) -> lists:concat([AppName, "_", Controller, "_controller"]).
module_name_for_file(_AppName, File) -> filename:basename(File, ".lfe").
compile_controller(File, Options) ->
do_compile(File... | Write BEAM files in dev mode to /tmp | LFE: Write BEAM files in dev mode to /tmp
| Erlang | mit | synlay/ChicagoBoss,ChicagoBoss/ChicagoBoss,yunkai/ChicagoBoss,frkarl/ChicagoBoss,solatis/ChicagoBoss,danikp/ChicagoBoss,7i11/ChicagoBoss,synlay/ChicagoBoss,7i11/ChicagoBoss,uselessd/ChicagoBoss,frkarl/ChicagoBoss,ChicagoBoss/ChicagoBoss,powermedia/ChicagoBoss,aherranz/ChicagoBoss,danikp/ChicagoBoss,uselessd/ChicagoBoss... |
06620d03287557175b2921347ccfc9c1f5519ab1 | src/riak_control_app.erl | src/riak_control_app.erl | %% ------------------------------------------------------------------
%%
%% Copyright (c) 2011 Basho Technologies, Inc.
%%
%% This file is provided to you under the Apache License,
%% Version 2.0 (the "License"); you may not use this file
%% except in compliance with the License. You may obtain
%% a copy of the Licens... | %% ------------------------------------------------------------------
%%
%% Copyright (c) 2011 Basho Technologies, Inc.
%%
%% This file is provided to you under the Apache License,
%% Version 2.0 (the "License"); you may not use this file
%% except in compliance with the License. You may obtain
%% a copy of the Licens... | Resolve incorrect capability negotation order. | Resolve incorrect capability negotation order.
| Erlang | apache-2.0 | basho/riak_control,basho/riak_control,riak-synrc/riak_control |
875ca8117d0fcc9530c60ea8bcb37e448638f551 | src/builderl_build_handler.erl | src/builderl_build_handler.erl | -module(builderl_build_handler).
-behaviour(cowboy_handler).
-compile({parse_transform, lager_transform}).
-export([init/2]).
init(Req0=#{method := <<"GET">>}, State) ->
Org = cowboy_req:binding(org, Req0),
Repo = cowboy_req:binding(repo, Req0),
lager:info("Org/Repo ~p/~p", [Org, Repo]),
Project = str... | -module(builderl_build_handler).
-behaviour(cowboy_handler).
-compile({parse_transform, lager_transform}).
-export([init/2]).
init(Req0=#{method := <<"GET">>}, State) ->
Org = cowboy_req:binding(org, Req0),
Repo = cowboy_req:binding(repo, Req0),
BuildID = binary:bin_to_list(cowboy_req:binding(build, Req0)... | Use build ID to get logs | Use build ID to get logs | Erlang | apache-2.0 | philipcristiano/builderl |
135948ed21516da5e19fd0c6d5a84ed27652be11 | gateway/apps/cvmfs_services/src/cvmfs_fe.erl | gateway/apps/cvmfs_services/src/cvmfs_fe.erl | %%%-------------------------------------------------------------------
%%% This file is part of the CernVM File System.
%%%
%%% @doc cvmfs_fe - CVMFS repo services HTTP front-end
%%%
%%% @end
%%%-------------------------------------------------------------------
-module(cvmfs_fe).
-export([start_link/1, api_version/0... | %%%-------------------------------------------------------------------
%%% This file is part of the CernVM File System.
%%%
%%% @doc cvmfs_fe - CVMFS repo services HTTP front-end
%%%
%%% @end
%%%-------------------------------------------------------------------
-module(cvmfs_fe).
-export([start_link/1, api_version/0... | Fix compilation for Cowboy 2.0.0-rc.1 | Fix compilation for Cowboy 2.0.0-rc.1
| Erlang | bsd-3-clause | DrDaveD/cvmfs,cvmfs/cvmfs,DrDaveD/cvmfs,DrDaveD/cvmfs,cvmfs/cvmfs,cvmfs/cvmfs,cvmfs/cvmfs,DrDaveD/cvmfs,DrDaveD/cvmfs,DrDaveD/cvmfs,cvmfs/cvmfs,DrDaveD/cvmfs,cvmfs/cvmfs,cvmfs/cvmfs |
67b5f60d9e10bf6bd81fe78b2fb4a870415f5286 | apps/etorrent/src/etorrent_endgame.erl | apps/etorrent/src/etorrent_endgame.erl | -module(etorrent_endgame).
-behaviour(gen_server).
%% gen_server callbacks
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
init('_') -> ok.
handle_call('_', '_', '_') -> ok.
handle_cast('_', '_') -> ok.
handle_info('_', '_') -> ok.
te... | -module(etorrent_endgame).
-behaviour(gen_server).
%% gen_server callbacks
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
init('_') -> ok.
handle_call({register_peer, Pid}, _, State) ->
%% Initialize peer data structures
{r... | Add register_peer callback to endgame server | Add register_peer callback to endgame server
| Erlang | bsd-2-clause | beni55/etorrent,jlouis/etorrent |
859c2e5ce697e9d371612441be62ad0f5813c3d8 | src/erlcfg_schema_analyser1.erl | src/erlcfg_schema_analyser1.erl | -module(erlcfg_schema_analyser1).
-include("schema.hrl").
-export([analyse/1]).
analyse([]) ->
?DEFAULT_TYPE_MAP;
analyse([Head|Rest]) ->
Types = ?DEFAULT_TYPE_MAP,
analyse(Head, Rest, Types).
analyse(Current, [Head|Rest], Types0) ->
Types1 = eval(Current, Types0),
analyse(Head, Rest, Types1);
an... | -module(erlcfg_schema_analyser1).
-include("schema.hrl").
-export([analyse/1]).
analyse([]) ->
?DEFAULT_TYPE_MAP;
analyse([Head|Rest]) ->
Types = ?DEFAULT_TYPE_MAP,
analyse(Head, Rest, Types).
analyse(Current, [Head|Rest], Types0) ->
Types1 = eval(Current, Types0),
analyse(Head, Rest, Types1);
an... | Build a proper validator for type defs | Build a proper validator for type defs
and add that to the validator mapping structure
Signed-off-by: Essien Ita Essien <bd402154b008803b915ff3326ddb7528f7e13a6b@gmail.com>
| Erlang | bsd-3-clause | saleyn/erlcfg |
a40d4119238604652a9dcb9c092c103cf625a363 | lib/sasl/test/test_lib.hrl | lib/sasl/test/test_lib.hrl | -define(ertsvsn,"4.4").
-define(kernelvsn,"2.14.3").
-define(stdlibvsn,"1.17.3").
| -define(ertsvsn,"4.4").
-define(kernelvsn,"2.15.3").
-define(stdlibvsn,"1.18.3").
| Update "old vsn" in sasl test to R15 instead of R14 (two back from R17) | Update "old vsn" in sasl test to R15 instead of R14 (two back from R17)
| Erlang | apache-2.0 | Teino1978-Corp/erlang-otp,uabboli/otp,palas/otp,Teino1978-Corp/otp,lemenkov/otp,haguenau/otp,bjorng/otp,sammoth-wazoku/otp,g-andrade/otp,g-andrade/otp,marquisthunder/otp,release-project/otp,cobusc/otp,riverrun/otp,NOMORECOFFEE/otp,cobusc/otp,ader1990/otp,rlipscombe/otp,GinjaNinja32/otp,goertzenator/otp,theom/otp,lrasca... |
8f7e33f5865168c737dc90b9e2e29e4da3a2edc1 | lib/docbuilder/test/docb_SUITE.erl | lib/docbuilder/test/docb_SUITE.erl | %% ``The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved via the world wide web at... | %% ``The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved via the world wide web at... | Update docbuilder tests to conform with common_test standard | Update docbuilder tests to conform with common_test standard
| Erlang | apache-2.0 | GinjaNinja32/otp,release-project/otp,RJ/otp,legoscia/otp,bernardd/otp,jamesruan/otp,potatosalad/otp,Teino1978-Corp/otp,fenollp/otp,sdebnath/otp,beni55/otp,release-project/otp,lianghaivv/otp,marquisthunder/otp,jj1bdx/otp,falkevik/otp,derek121/otp,GinjaNinja32/otp,beni55/otp,legoscia/otp,lemenkov/otp,emacsmirror/erlang,j... |
06984ec499e3f18ac40a892c99e140f9ba296d29 | src/beamjs_repl_console.erl | src/beamjs_repl_console.erl | -module(beamjs_repl_console).
-export([read/1,print/1]).
read(Prompt) ->
io:get_line(Prompt).
print({finished, Result}) ->
io:format(">>> ~p~n",[Result]);
print({exception, Exception}) ->
io:format(" Exception: ~p~n",[Exception]).
| -module(beamjs_repl_console).
-export([read/1,print/1]).
read(Prompt) ->
io:get_line(Prompt).
print({finished, Result}) ->
io:format("~p~n",[Result]);
print({exception, Exception}) ->
io:format(" Exception: ~p~n",[Exception]).
| Make copying results off console REPL easier | Make copying results off console REPL easier
| Erlang | bsd-2-clause | beamjs/beamjs,beamjs/beamjs |
0c77d715bb8659a91348c5ca85b0aff65af60577 | exercise2/test/starter_tests.erl | exercise2/test/starter_tests.erl | -module(starter_tests).
-include_lib("eunit/include/eunit.hrl").
-export([name_service/0]).
name_service() ->
receive
terminate -> ok
end.
withRedefedNameService(Name) ->
PID = spawn(?MODULE, name_service, []),
yes = global:register_name(Name, PID),
PID.
logging_test() ->
Expected = list_to_atom(list... | -module(starter_tests).
-include_lib("eunit/include/eunit.hrl").
-export([name_service/0]).
name_service() ->
receive
terminate -> ok
end.
withRedefedNameService(Name) ->
PID = spawn(?MODULE, name_service, []),
yes = global:register_name(Name, PID),
PID.
logging_test() ->
Expected = list_to_atom(list... | Rename bind name service function | Rename bind name service function
| Erlang | mit | meandor/vs2017,meandor/vs2017 |
e29814daf8d1ba443a0facd1ad50fbc5cd06a8b5 | apps/pushy/src/pushy_org.erl | apps/pushy/src/pushy_org.erl | %% -*- erlang-indent-level: 4;indent-tabs-mode: nil; fill-column: 92-*-
%% ex: ts=4 sw=4 et
%% @author James Casey <james@opscode.com>
%% @copyright 2012 Opscode, Inc.
%% @doc Handle org_name to org_guid mappings by calling out to
%% opscode-account
-module(pushy_org).
-define(POC_ORG_ID, <<"aaaaaaaaaaaaaaaaaaaaaaaaa... | %% -*- erlang-indent-level: 4;indent-tabs-mode: nil; fill-column: 92-*-
%% ex: ts=4 sw=4 et
%% @author James Casey <james@opscode.com>
%% @copyright 2012 Opscode, Inc.
%% @doc Handle org_name to org_guid mappings by calling out to
%% opscode-account
-module(pushy_org).
-define(POC_ORG_ID, <<"aaaaaaaaaaaaaaaaaaaaaaaaa... | Update the spec for fetch_org_id | Update the spec for fetch_org_id
| Erlang | apache-2.0 | chef/opscode-pushy-server,MSch/opscode-pushy-server,chef/opscode-pushy-server,MSch/opscode-pushy-server,chef/opscode-pushy-server |
e1323ecb94d72fce430f91b63fdc1da7f62b62b1 | finapp_sup.erl | finapp_sup.erl | %%%' HEADER
%%% @author {{author_name}} <{{author_email}}>
%%% @since {{date}}
%%% @copyright {{copyright_year}} {{author_name}}
%%% @doc {{description}}
%%% @end
-module(tint_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
%%%.
%%%' PUBLIC API
start_link() ->
supervisor:start_link({lo... | %%%' HEADER
%%% @author {{author_name}} <{{author_email}}>
%%% @since {{date}}
%%% @copyright {{copyright_year}} {{author_name}}
%%% @doc {{description}}
%%% @end
-module({{name}}_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
%%%.
%%%' PUBLIC API
start_link()... | Fix finapp supervisor's module name | Fix finapp supervisor's module name
Module name of finapp's supervisor template uses {{name}} now instead of
hard coded "tint". My bad.
| Erlang | apache-2.0 | jacktang/rebar-templates,jacktang/rebar-templates |
5c3e8fe1fc8bc9163928d56a7fbf91c08873c412 | src/utils/mas_config.erl | src/utils/mas_config.erl | %% @doc Defoult configurion and config-parsing functions.
-module(mas_config).
-include("mas.hrl").
-export([proplist_to_record/1]).
-define(LOAD(Prop, Dict), Prop = dict:fetch(Prop,Dict)).
%% @doc Transform a proplist with config properties to a record
-spec proplist_to_record([tuple()]) -> config().
proplist_to_r... | %% @doc Defoult configurion and config-parsing functions.
-module(mas_config).
-include("mas.hrl").
-export([proplist_to_record/1]).
-define(LOAD(Prop, Proplist),
Prop = proplists:get_value(Prop,Proplist)).
%% @doc Transform a proplist with config properties to a record
-spec proplist_to_record([tuple()]) -... | Use Proplist in fawor of dict. | Use Proplist in fawor of dict.
| Erlang | mit | ParaPhraseAGH/erlang-mas |
945949a4d826890e29698524c6dd49da170584c3 | src/lurch_device_driver.erl | src/lurch_device_driver.erl | -module( lurch_device_driver ).
% API functions
-export(
[ start_driver/2
] ).
% API functions
start_driver( _Driver, _Parameters ) ->
Port = undefined,
{ ok, Port }.
driver_path( Driver ) ->
filename:join( [ code:lib_dir( lurch, drivers ), Driver ] ).
| -module( lurch_device_driver ).
% API functions
-export(
[ start_driver/2
] ).
% API functions
start_driver( _Driver, _Parameters ) ->
Port = undefined,
{ ok, Port }.
driver_path( Driver ) ->
case filename:pathtype(Driver) of
relative -> ok;
_ -> throw({error, bad_driver})
end,
case lists:member(".."... | Add sanity checks for driver path | Add sanity checks for driver path
| Erlang | mit | hrubi/lurch |
6fead96df19a4500fb3aaef1c4a6cc9deb20fd31 | src/logplex_syslog_utils.erl | src/logplex_syslog_utils.erl | %% @copyright Geoff Cant
%% @author Geoff Cant <nem@erlang.geek.nz>
%% @version {@vsn}, {@date} {@time}
%% @doc Syslog message formatting utilities.
%% @end
-module(logplex_syslog_utils).
-export([to_msg/1
,frame/1]).
-type syslog_msg() :: {0..128, 0..7,
Time::iolist(), Source::iolist(... | %% @copyright Geoff Cant
%% @author Geoff Cant <nem@erlang.geek.nz>
%% @version {@vsn}, {@date} {@time}
%% @doc Syslog message formatting utilities.
%% @end
-module(logplex_syslog_utils).
-export([to_msg/1
,frame/1]).
-type syslog_msg() :: {0..128, 0..7,
Time::iolist(), Source::iolist(... | Add syslog version to msg formatter. | Add syslog version to msg formatter. | Erlang | mit | mkrysiak/logplex,srid/logplex,voidlock/logplex |
c7991f79c1177763f7c2a9b0a05d38a1fe11a67b | run.escript | run.escript | #!/usr/bin/env escript
%%! -noinput -pa ../encurses/ebin +A 10
-include_lib("encurses/include/encurses.hrl").
main(_) -> encurses_demo:go().
| #!/usr/bin/env escript
%%! -noinput -pa ./ebin +A 10
-include_lib("include/encurses.hrl").
main(_) -> encurses_demo:go().
| Make so that demo can work whatever repo`s name. | Make so that demo can work whatever repo`s name.
| Erlang | apache-2.0 | sofuture/encurses |
85c281085cb081c0c19b0e189aaa13587d561438 | include/olegdb.hrl | include/olegdb.hrl | %%% The MIT License (MIT)
%%%
%%% Copyright (c) 2014 Quinlan Pfiffer, Kyle Terry
%%%
%%% Permission is hereby granted, free of charge, to any person obtaining a copy
%%% of this software and associated documentation files (the "Software"), to deal
%%% in the Software without restriction, including without limitation ... | %%% The MIT License (MIT)
%%%
%%% Copyright (c) 2014 Quinlan Pfiffer, Kyle Terry
%%%
%%% Permission is hereby granted, free of charge, to any person obtaining a copy
%%% of this software and associated documentation files (the "Software"), to deal
%%% in the Software without restriction, including without limitation ... | Change default content-type to application/octet-stream | Change default content-type to application/octet-stream
| Erlang | mit | infoforcefeed/OlegDB,infoforcefeed/OlegDB,infoforcefeed/OlegDB,infoforcefeed/OlegDB |
646e38a5d72ecf21e3d3031689e3ce83b55ab4e8 | src/elements/html5/element_html5_header.erl | src/elements/html5/element_html5_header.erl | % vim: sw=4 ts=4 et ft=erlang
% Nitrogen Web Framework for Erlang
% See MIT-LICENSE for licensing information.
-module (element_html5_header).
-include("wf.hrl").
-export([
reflect/0,
render_element/1
]).
-spec reflect() -> [atom()].
reflect() -> record_info(fields, html5_header).
-spec render_element(#html5... | % vim: sw=4 ts=4 et ft=erlang
% Nitrogen Web Framework for Erlang
% See MIT-LICENSE for licensing information.
-module (element_html5_header).
-include("wf.hrl").
-export([
reflect/0,
render_element/1
]).
-spec reflect() -> [atom()].
reflect() -> record_info(fields, html5_header).
-spec render_element(#html5... | Remove enforcement rules from html5_header | Remove enforcement rules from html5_header
| Erlang | mit | choptastic/nitrogen_core,nitrogen/nitrogen_core,nitrogen/nitrogen_core,choptastic/nitrogen_core,choptastic/nitrogen_core,nitrogen/nitrogen_core,nitrogen/nitrogen_core |
f4e8f2bc8814ab8362e034aef19593f455d49557 | include/pvc.hrl | include/pvc.hrl | %% Rubis
-define(GROUPING_SEP, <<"+">>).
-define(ID_SEP, <<"@">>).
-define(FIELD_SEP, <<"/">>).
%% General indices
-define(INDEX_SEP, <<"$">>).
-define(UINDEX_SEP, <<"%">>).
-define(INDEX_PAGE_LIMIT, 25).
%% Amount of Transaction metadata kept for the Version and Commit log
%%
%% VERSION_THRESHOLD specifies the point... | %% Rubis
-define(GROUPING_SEP, <<"+">>).
-define(ID_SEP, <<"@">>).
-define(FIELD_SEP, <<"/">>).
%% General indices
-define(INDEX_SEP, <<"$">>).
-define(UINDEX_SEP, <<"%">>).
-define(INDEX_PAGE_LIMIT, 25).
%% Amount of Transaction metadata kept for the Version and Commit log
%%
%% VERSION_THRESHOLD specifies the point... | Purge version/commit logs more often | Purge version/commit logs more often
| Erlang | apache-2.0 | ergl/antidote |
808616bb80313fc91aca08e4ebc3239797a5e5c9 | src/cowmachine_websocket_upgrade.erl | src/cowmachine_websocket_upgrade.erl | -module(cowmachine_websocket_upgrade).
-export([
upgrade/2
]).
%% @doc Upgrade the request to a websocket request
-spec upgrade(atom(), cowmachine_req:context()) -> {ok, cowboy_req:req(), cowboy_middleware:env()}.
upgrade(Handler, Context) ->
Req = cowmachine_req:req(Context),
Env = #{},
cowboy_we... | -module(cowmachine_websocket_upgrade).
-export([
upgrade/2
]).
%% @doc Upgrade the request to a websocket request
-spec upgrade(atom(), cowmachine_req:context()) -> {ok, cowboy_req:req(), cowboy_middleware:env()}.
upgrade(Handler, Context) ->
Req = cowmachine_req:req(Context),
Env = #{},
Opts = #{... | Fix websocket upgrade for cowboy 2.0.0-pre.10 | Fix websocket upgrade for cowboy 2.0.0-pre.10
| Erlang | apache-2.0 | zotonic/cowmachine |
b8c3ac7de5c27cf28051866486cb2528d1b4756e | src/erldns_app.erl | src/erldns_app.erl | -module(erldns_app).
-behavior(application).
% Application hooks
-export([start/2, stop/1]).
start(Type, Args) ->
lager:info("~p:start(~p, ~p)~n", [?MODULE, Type, Args]),
random:seed(erlang:now()),
optionally_start_debugger(),
enable_metrics(),
erldns_sup:start_link().
stop(State) ->
lager:info("~p:stop(... | -module(erldns_app).
-behavior(application).
% Application hooks
-export([start/2, stop/1]).
start(Type, Args) ->
lager:info("~p:start(~p, ~p)~n", [?MODULE, Type, Args]),
random:seed(erlang:now()),
optionally_start_debugger(),
enable_metrics(),
erldns_sup:start_link().
stop(State) ->
lager:info("~p:stop(... | Add folsom metric for lookup time | Add folsom metric for lookup time | Erlang | mit | redbeardster/erl-dns,T0ha/erl-dns,SiftLogic/erl-dns,fromeroj/erl-dns,aetrion/erl-dns |
e114a767af3faffb9b2a099566bd7c87af6bc83c | rel/overlay/common/site/src/nitrogen_main_handler.erl | rel/overlay/common/site/src/nitrogen_main_handler.erl | -module(nitrogen_main_handler).
-export([run/0]).
run() ->
%% Put any custom handlers here
%% See http://nitrogenproject.com/doc/handlers.html
%% Example:
%%
%% wf_handler:set_handler(MySecurityHandler, HandlerConfig),
%%
wf_core:run().
| %% vim: ts=4 sw=4 et
-module(nitrogen_main_handler).
-export([
run/0,
ws_init/0
]).
handlers() ->
%% Put any custom handlers here
%% See http://nitrogenproject.com/doc/handlers.html
%% Example:
%%
%% wf_handler:set_handler(MySecurityHandler, HandlerConfig),
%%
ok.
ws_init() ->
... | Fix default main handler with ws_init | Fix default main handler with ws_init
| Erlang | mit | kevinmontuori/nitrogen,choptastic/nitrogen,stuart-thackray/nitrogen,choptastic/nitrogen,kevinmontuori/nitrogen,choptastic/nitrogen,nitrogen/nitrogen,joaohf/nitrogen,joaohf/nitrogen,kevinmontuori/nitrogen,stuart-thackray/nitrogen,joaohf/nitrogen,stuart-thackray/nitrogen,nitrogen/nitrogen,nitrogen/nitrogen |
712ee647fa74f61605b65bb1a22d95a637880ed3 | lib/etorrent-1.0/src/etorrent_t_peer_pool_sup.erl | lib/etorrent-1.0/src/etorrent_t_peer_pool_sup.erl | %%%-------------------------------------------------------------------
%%% File : etorrent_t_peer_pool_sup.erl
%%% Author : Jesper Louis Andersen <>
%%% Description : Supervise a group of peer processes.
%%%
%%% Created : 17 Aug 2007 by Jesper Louis Andersen <>
%%%---------------------------------------------------... | %%%-------------------------------------------------------------------
%%% File : etorrent_t_peer_pool_sup.erl
%%% Author : Jesper Louis Andersen <>
%%% Description : Supervise a group of peer processes.
%%%
%%% Created : 17 Aug 2007 by Jesper Louis Andersen <>
%%%---------------------------------------------------... | Implement support for peer processes. | Implement support for peer processes.
| Erlang | bsd-2-clause | jlouis/etorrent,beni55/etorrent |
35413445b724fb56e94e333caff833b93c51cddc | include/riak_ensemble_types.hrl | include/riak_ensemble_types.hrl | -type ensemble_id() :: term().
-type peer_id() :: {term(), node()}.
-type leader_id() :: undefined | peer_id().
-type fixme() :: any().
-type views() :: [[peer_id()]].
-type peer_change() :: term(). %% FIXME
-type change_error() :: already_member | not_member.
-type std_reply() :: timeout | failed | unavailable | nack ... | -type ensemble_id() :: term().
-type peer_id() :: {term(), node()}.
-type leader_id() :: undefined | peer_id().
-type fixme() :: any().
-type views() :: [[peer_id()]].
-type peer_change() :: term(). %% FIXME
-type change_error() :: already_member | not_member.
-type std_reply() :: timeout | failed | unavailable | nack ... | Increase ensemble tick from 200ms to 500ms | Increase ensemble tick from 200ms to 500ms
This commit slightly increases the ensemble tick rate in order to
decrease the commit frequency and reduce load when using a large
number of ensembles.
| Erlang | apache-2.0 | sargun/riak_ensemble,basho/riak_ensemble,sargun/riak_ensemble,ricardobcl/riak_ensemble,cmeiklejohn/riak_ensemble,ricardobcl/riak_ensemble,basho/riak_ensemble,cmeiklejohn/riak_ensemble |
a5776023a6c007316e6376fd0dca903770034133 | src/check_riak_kv_up.erl | src/check_riak_kv_up.erl | -module(check_riak_kv_up).
-export([run/2]).
run(Options, _) ->
Node = proplists:get_value(node, Options),
check_riak_kv_up(Node).
check_riak_kv_up(Node) ->
Services = rpc:call(Node, riak_core_node_watcher, services, []),
case lists:member(riak_kv, Services) of
true ->
{ok, "riak_... | -module(check_riak_kv_up).
-export([run/2]).
run(Options, _) ->
Node = proplists:get_value(node, Options),
check_riak_kv_up(Node).
check_riak_kv_up(Node) ->
Services = rpc:call(Node, riak_core_node_watcher, services, []),
check_riak_kv_services(Node, Services).
check_riak_kv_services(Node, Services)... | Check that rpc returned a list before calling lists:member | Check that rpc returned a list before calling lists:member
| Erlang | apache-2.0 | basho-labs/riak_nagios |
795632e8940a7746f77fe0970cbdc6f5e6852b9b | src/jrl_lex.erl | src/jrl_lex.erl | % lex.erl
% Lexer implementation for Jrlscript Compiler
-module(jrl_lex).
-compile(export_all).
lex() ->
io:format("Usage - lex(Input<String>).~n", []).
lex(Input) ->
SplitInput = re:split(Input, "", [{return, binary}]),
scan(SplitInput).
% Scanner Functions:
% Scans a list in the form [<<char>...] and gener... | % lex.erl
% Lexer implementation for Jrlscript Compiler
-module(jrl_lex).
-compile(export_all).
lex() ->
io:format("Usage - lex(Input<String>).~n", []).
lex(Input) ->
SplitInput = re:split(Input, "", [{return, binary}]),
scan(SplitInput).
% Scanner Functions:
% Scans a list in the form [<<char>...] and gener... | Test because my commits seemingly aren't being tracked | Test because my commits seemingly aren't being tracked
| Erlang | mit | Vereis/jarlang,Vereis/jarlang |
e90a4877461380e07f43a8a1617d6a5f6cdcca7f | src/elements/forms/element_radiogroup.erl | src/elements/forms/element_radiogroup.erl | % Nitrogen Web Framework for Erlang
% Copyright (c) 2008-2009 Rusty Klophaus
% See MIT-LICENSE for licensing information.
-module (element_radiogroup).
-include ("wf.inc").
-compile(export_all).
reflect() -> record_info(fields, radiogroup).
render(ControlID, Record) ->
% Set the group to the current ControlID...
... | % Nitrogen Web Framework for Erlang
% Copyright (c) 2008-2009 Rusty Klophaus
% See MIT-LICENSE for licensing information.
-module (element_radiogroup).
-include ("wf.inc").
-compile(export_all).
reflect() -> record_info(fields, radiogroup).
render(ControlID, Record) ->
% Set the group to the current ControlID...
... | Allow radiogroup name to recurse through a binding | Allow radiogroup name to recurse through a binding
| Erlang | mit | stuart-thackray/nitrogen,joaohf/nitrogen,kevinmontuori/nitrogen,kaos/nitrogen,joaohf/nitrogen,choptastic/nitrogen,nitrogen/nitrogen,stuart-thackray/nitrogen,stuart-thackray/nitrogen,kaos/nitrogen,nitrogen/nitrogen,kevinmontuori/nitrogen,joaohf/nitrogen,choptastic/nitrogen,choptastic/nitrogen,kevinmontuori/nitrogen,nitr... |
b91f2a16bfc55343a7254b8b74203c9e80232633 | apps/cvmfs_services/src/cvmfs_fe.erl | apps/cvmfs_services/src/cvmfs_fe.erl | %%%-------------------------------------------------------------------
%%% This file is part of the CernVM File System.
%%%
%%% @doc cvmfs_fe - CVMFS repo services HTTP front-end
%%%
%%% @end
%%%-------------------------------------------------------------------
-module(cvmfs_fe).
-export([start_link/1, api_version/0... | %%%-------------------------------------------------------------------
%%% This file is part of the CernVM File System.
%%%
%%% @doc cvmfs_fe - CVMFS repo services HTTP front-end
%%%
%%% @end
%%%-------------------------------------------------------------------
-module(cvmfs_fe).
-export([start_link/1, api_version/0... | Use much larger request timeouts for the Cowboy server | Use much larger request timeouts for the Cowboy server
| Erlang | bsd-3-clause | cvmfs/cvmfs_services,cvmfs/cvmfs_services |
2cca38144aa4b4d95519cbc9e621a1db812353bd | src/iota_utils.erl | src/iota_utils.erl | -module(iota_utils).
-export([ get/2,
get/3,
with_xref/1
]).
get(Key, List) ->
case lists:keyfind(Key, 1, List) of
false -> throw(key_not_found);
{Key, Value} -> Value
end.
get(Key, List, Default) ->
case lists:keyfind(Key, 1, List) of
false -> Default;
... | -module(iota_utils).
-export([ get/2,
get/3,
with_xref/1
]).
get(Key, List) ->
case lists:keyfind(Key, 1, List) of
false -> throw(key_not_found);
{Key, Value} -> Value
end.
get(Key, List, Default) ->
case lists:keyfind(Key, 1, List) of
false -> Default;
... | Rename iota xref server to iota_xref | Rename iota xref server to iota_xref
| Erlang | mit | jpgneves/iota |
67d5b3e7eceb4b882d806d7b7cd49061b6bd8ab8 | erlang-cowboy/src/eventsource_app.erl | erlang-cowboy/src/eventsource_app.erl | -module(eventsource_app).
-behaviour(application).
-export([start/2]).
-export([stop/1]).
start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
{"/sse", eventsource_emitter, []},
{"/connections", connections_handler, []}
]}
]),
cowboy:start_http(sse_hand... | -module(eventsource_app).
-behaviour(application).
-export([start/2]).
-export([stop/1]).
start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
{"/sse", eventsource_emitter, []},
{"/connections", connections_handler, []}
]}
]),
cowboy:start_http(sse_hand... | Make it listen to port 1942 instead of 8080. | Make it listen to port 1942 instead of 8080.
| Erlang | mit | rexxars/sse-broadcast-benchmark,rexxars/sse-broadcast-benchmark,rexxars/sse-broadcast-benchmark,rexxars/sse-broadcast-benchmark,rexxars/sse-broadcast-benchmark,rexxars/sse-broadcast-benchmark,rexxars/sse-broadcast-benchmark,rexxars/sse-broadcast-benchmark |
3e416853b30f17c70f477ea103c92a8023ad4923 | src/terminal_logger.erl | src/terminal_logger.erl | %%%-------------------------------------------------------------------
%%% File : terminal_logger.erl
%%% Author : Nicolas R Dufour <nrdufour@gmail.com>
%%% Created : 2009/06/01
%%% Description :
%%% Simple terminal logger from the erlang documentation.
%%%
%%% Copyright 2009 Nicolas R Dufour <nrdufour@gmail.com>
%... | %%%-------------------------------------------------------------------
%%% File : terminal_logger.erl
%%% Author : Nicolas R Dufour <nrdufour@gmail.com>
%%% Created : 2009/06/01
%%% Description :
%%% Simple terminal logger from the erlang documentation.
%%%
%%% Copyright 2009 Nicolas R Dufour <nrdufour@gmail.com>
%... | Add a better logger with io:format capabilities. | Add a better logger with io:format capabilities.
| Erlang | mit | nrdufour/similar |
c7fde14640267ab34477a451a67b3181e18146de | test/ucp_utils_tests.erl | test/ucp_utils_tests.erl | -module(ucp_utils_tests).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
to_hex_test_() ->
[{"int to hexstr",
fun () ->
?assertEqual("0F", ucp_utils:to_hexstr(15))
end},
{"list to hexstr",
?_test(?assertEqual("081E", ucp_utils:to_hexstr([8,30])))},
{"str to hexstr",
?_test(?ass... | -module(ucp_utils_tests).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
to_hex_test_() ->
[{"int to hexstr",
fun () ->
?assertEqual("0F", ucp_utils:to_hexstr(15))
end},
{"list to hexstr",
?_test(?assertEqual("081E", ucp_utils:to_hexstr([8,30])))},
{"binary to hexstr",
?_test(?... | Add new hex string conversion tests | Add new hex string conversion tests
| Erlang | apache-2.0 | K2InformaticsGmbH/smpp_simulator,K2InformaticsGmbH/ucp_simulator,K2InformaticsGmbH/smsc_simulator |
4a59d7ee22e79c16bd9e69d9928ab590818a2481 | include/rivus_cep.hrl | include/rivus_cep.hrl | %%------------------------------------------------------------------------------
%% Copyright (c) 2013 Vasil Kolarov
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% http://www.a... | %%------------------------------------------------------------------------------
%% Copyright (c) 2013 Vasil Kolarov
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% http://www.a... | Build graph from the event pattern | Build graph from the event pattern
| Erlang | apache-2.0 | vascokk/rivus_cep |
ad87fee0affb13ce1d5a362b237a7030b9822845 | test/websocket_handler_init_shutdown.erl | test/websocket_handler_init_shutdown.erl | %% Feel free to use, reuse and abuse the code in this file.
-module(websocket_handler_init_shutdown).
-behaviour(cowboy_http_handler).
-behaviour(cowboy_http_websocket_handler).
-export([init/3, handle/2, terminate/2]).
-export([websocket_init/3, websocket_handle/3,
websocket_info/3, websocket_terminate/3]).
init(_A... | %% Feel free to use, reuse and abuse the code in this file.
-module(websocket_handler_init_shutdown).
-behaviour(cowboy_http_handler).
-behaviour(cowboy_http_websocket_handler).
-export([init/3, handle/2, terminate/2]).
-export([websocket_init/3, websocket_handle/3,
websocket_info/3, websocket_terminate/3]).
init(_A... | Fix a websocket test handler that was throwing an unwanted error | Fix a websocket test handler that was throwing an unwanted error
The test still worked because we expect the websocket connection
to fail, but it didn't fail exactly the way we wanted it to.
| Erlang | isc | hairyhum/cowboy,Reimerei/cowboy,chef/cowboy,CrankWheel/cowboy,pap/cowboy,nviennot/cowboy,cad627/cowboy,lpgauth/cowboy,heroku/cowboy,essen/cowboy,piboye/cowboy,276361270/cowboy,sile/cowboy,binarin/cowboy,grahamrhay/cowboy,ninenines/cowboy,callsign-core/cowboy_hybi00,paulperegud/cowboy,layerhq/cowboy,dangjun625/cowboy,bs... |
d8f254e3382bfcef768c664f0b4c1483d69f0507 | src/minuteman_sup.erl | src/minuteman_sup.erl | -module(minuteman_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
%% Helper macro for declaring children of supervisor
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
%% =========================================================... | -module(minuteman_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
%% Helper macro for declaring children of supervisor
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
%% =========================================================... | Move top-level sup to one_for_one | Move top-level sup to one_for_one
| Erlang | apache-2.0 | GoelDeepak/minuteman,GoelDeepak/minuteman |
4b36af6744ecb3308f5bf675b6ea3a60daf97e09 | volume.erl | volume.erl | -module(volume).
-behaviour(gen_server).
-export([start/1]).
-export([get/0, set/1]).
-export([init/1, handle_call/3]).
%---------------------------------------------------------------------------
start(Sconf) ->
io:format("Starting volume control.~n"),
gen_server:start_link({local, volume}, volume, [], []).... | -module(volume).
-behaviour(gen_server).
-export([start/1]).
-export([get/0, set/1]).
-export([init/1, handle_call/3]).
%---------------------------------------------------------------------------
start(Sconf) ->
io:format("Starting volume control.~n"),
gen_server:start_link({local, volume}, volume, [], []).... | Use "null" instead of "unavailable" for hmix | Use "null" instead of "unavailable" for hmix
| Erlang | mit | tonyg/erlang-jukebox,tonyg/erlang-jukebox,tonyg/erlang-jukebox |
af5096b6f071118ea680f3b03d2ab90a95e1a334 | src/rebar.erl | src/rebar.erl | %% -------------------------------------------------------------------
%%
%% rebar: Erlang Build Tools
%%
%% Copyright (c) 2009 Dave Smith (dizzyd@dizzyd.com)
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to de... | %% -------------------------------------------------------------------
%%
%% rebar: Erlang Build Tools
%%
%% Copyright (c) 2009 Dave Smith (dizzyd@dizzyd.com)
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to de... | Make sure to bail w/ return code of 1 when error has occurred | Make sure to bail w/ return code of 1 when error has occurred
| Erlang | apache-2.0 | sile/rebar3,thomasbhatia/rebar,saleyn/rebar3,walrusVision/rebar3,basho/rebar,lrascao/rebar,fishcakez/rebar3,fauxsoup/rebar3,zugolosian/rebar3,sile/rebar3,matwey/rebar,cloudant/couchdb-rebar,RubberCthulhu/rebar,scatterbrain/rebar,paulo-ferraz-oliveira/rebar,jacktang/rebar,macintux/rebar,shkumagai/rebar,basho/rebar,rebar... |
c2869c78385fb38d927f41231ac258c7ef4c2540 | src/amoc_always_null_ssl_session_cache.erl | src/amoc_always_null_ssl_session_cache.erl | -module(amoc_always_null_ssl_session_cache).
-behaviour(ssl_session_cache_api).
-export([delete/2,
foldl/3,
init/1,
lookup/2,
select_session/2,
terminate/1,
update/3]).
init(_) -> invalid.
terminate(_) -> ok.
lookup(_,_) -> undefined.
update(_,_,_) -> ok.
del... | -module(amoc_always_null_ssl_session_cache).
-behaviour(ssl_session_cache_api).
-export([delete/2,
foldl/3,
init/1,
lookup/2,
select_session/2,
terminate/1,
update/3]).
%% not exported by ssl
%% only defined in "ssl_internal.hrl", we redefine it
-type db_handle()... | Add specs to always null ssl cache | Add specs to always null ssl cache
| Erlang | apache-2.0 | esl/amoc |
1849f39a754e7afc9ad4565adf28120655a37c09 | erlang/if_and_case.erl | erlang/if_and_case.erl | % A reall % First line is ignored when running with escript
main(_) ->
X = 38,
Temperature1 = case X of
_ when X < 0 -> cold;
_ when X < 20 -> cool;
_ when X < 45 -> fine;
_ -> hot
end,
Temperature2 = if
X < 0 -> cold;
X < 20 -> cool;
X < 45 -> fine;
true -> hot
end,
% Tes... | % First line is ignored when running with escript
main(_) ->
X = 38,
Temperature1 = case X of
_ when X < 0 -> cold;
_ when X < 20 -> cool;
_ when X < 45 -> fine;
_ -> hot
end,
Temperature2 = if
X < 0 -> cold;
X < 20 -> cool;
X < 45 -> fine;
true -> hot
end,
% Test
[fine,... | Fix a typo in comment | Fix a typo in comment
| Erlang | mit | rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal... |
ef717d4f747fcc4f8749f16e73d46ab2948ee8c4 | src/unimate_tcp_server.erl | src/unimate_tcp_server.erl | -module(unimate_tcp_server).
-behaviour(gen_nb_server).
%% API
-export([start_link/0]).
%% gen_nb_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2]).
-export([terminate/2, code_change/3, sock_opts/0, new_connection/2]).
-define(SOCKET_OPTS, [binary, {packet, 0}, {active, false}]).
-rec... | -module(unimate_tcp_server).
-behaviour(gen_nb_server).
%% API
-export([start_link/0]).
%% gen_nb_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2]).
-export([terminate/2, code_change/3, sock_opts/0, new_connection/2]).
-define(SOCKET_OPTS, [binary, {packet, 0}, {active, false}]).
-rec... | Fix old test module name left in | Fix old test module name left in
| Erlang | mit | smarkets/unimate |
93bf373f8e2ca73ad5a31201733d8a8d97999553 | src/basho_bench_driver_null.erl | src/basho_bench_driver_null.erl | %% -------------------------------------------------------------------
%%
%% basho_bench: Benchmarking Suite
%%
%% Copyright (c) 2009-2010 Basho Techonologies
%%
%% This file is provided to you under the Apache License,
%% Version 2.0 (the "License"); you may not use this file
%% except in compliance with the License. ... | %% -------------------------------------------------------------------
%%
%% basho_bench: Benchmarking Suite
%%
%% Copyright (c) 2009-2010 Basho Techonologies
%%
%% This file is provided to you under the Apache License,
%% Version 2.0 (the "License"); you may not use this file
%% except in compliance with the License. ... | Fix usage of run() in null driver | Fix usage of run() in null driver
| Erlang | apache-2.0 | mrallen1/basho_bench,marksteele/basho_bench,linearregression/basho_bench,basho/basho_bench,basho/basho_bench,leo-project/basho_bench,basho/basho_bench,basho/basho_bench,marksteele/basho_bench,GabrielNicolasAvellaneda/basho_bench,GabrielNicolasAvellaneda/basho_bench,GabrielNicolasAvellaneda/basho_bench,fogfish/basho_ben... |
e363a65f6ea99ff856cef93eb87fef33dc69269f | src/rebar.erl | src/rebar.erl | %% -------------------------------------------------------------------
%%
%% rebar: Erlang Build Tools
%%
%% Copyright (c) 2009 Dave Smith (dizzyd@dizzyd.com)
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to de... | %% -------------------------------------------------------------------
%%
%% rebar: Erlang Build Tools
%%
%% Copyright (c) 2009 Dave Smith (dizzyd@dizzyd.com)
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to de... | Make sure to bail w/ return code of 1 when error has occurred | Make sure to bail w/ return code of 1 when error has occurred
| Erlang | apache-2.0 | mbbx6spp/rebar |
87fd3cfaf240895fc1f129adab70f27ae862e782 | src/rets_app.erl | src/rets_app.erl | -module(rets_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%% ===================================================================
%% Application callbacks
%% ===================================================================
start(_StartType, _StartArgs) ->
start_cowboy_inst... | %% -*- mode: erlang; erlang-indent-level: 2 -*-
-module(rets_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%% ===================================================================
%% Application callbacks
%% ===================================================================
star... | Stop the http server when terminating rets | Stop the http server when terminating rets
| Erlang | mit | massemanet/rets |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.