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
#ifndef __EXAMPLE_H__ | |
#define __EXAMPLE_H__ | |
#include <vector> | |
class Example { | |
public: | |
static int D; | |
static vector<Example> examples; | |
} |
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
#include <vector> | |
#include <iostream> | |
class Example { | |
public: | |
static int STATIC_VARIABLE; | |
static std::vector<Example> examples; | |
int NON_STATIC_VARIABLE; | |
Example(int mod) { |
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
from django.db import models | |
from django.contrib.auth.models import User | |
class Todo(models.Model): | |
""" | |
A Todo dummy class. | |
""" | |
created = models.DateTimeField(auto_now_add=True) | |
author = models.ForeignKey(User) | |
text = models.CharField(max_length=255) |
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
defmodule Alchemy.Time do | |
@author "Iuri L. Machado <[email protected]>" | |
@copyright "2015 .Fix." | |
@license "BSD" | |
use GenServer | |
require Logger | |
@moduledoc """ | |
RFC 1123 Time compatible. It caches time on an ets table that is updated |
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
00:10:41.238 [error] Error in process <0.692.0> with exit value: {[{reason,undef},{mfa,{'Elixir.Site.Index',init,3}},{stacktrace,[{'Elixir.Site.Index',init,[{tcp,http},{http_req,#Port<0.6711>,ranch_tcp,keepalive,<0.692.0>,<<3 bytes>>,'HTTP/1.1',{{127,0,0,1},47170},<<9 bytes>>,undefined,8080,<<1 byte>>,undefined,<<0 bytes>>,undefined,[],[{<<4 bytes>>,<<14 bytes>>},{<<10 bytes>>,<<76 bytes>>},{<<6 bytes>>,<<63 bytes>>},{<<15 bytes>>,<<14 bytes>>},{<<15 bytes>>,<<13 bytes>>},{<<10 bytes>>,<<10 bytes>>},{<<13 bytes>>,<<9 bytes>>}],... | |
00:10:41.272 [error] Ranch listener :my_http_listener had connection process started with :cowboy_protocol:start_link/4 at #PID<0.692.0> exit with reason: {[reason: :undef, mfa: {Site.Index, :init, 3}, stacktrace: [{Site.Index, :init, [{:tcp, :http}, {:http_req, #Port<0.6711>, :ranch_tcp, :keepalive, #PID<0.692.0>, "GET", :"HTTP/1.1", {{127, 0, 0, 1}, 47170}, "localhost", :undefined, 8080, "/", :undefined, "", :undefined, [], [{"host", "localhost:8080"}, {"user-agent", "Mozilla/ |
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(factorial). | |
-export[fac1/1, fac2/1]. | |
%% With guards | |
fac1(x) when x <= 0 -> 1; | |
fac1(x) when x > 0 -> x * fac(x-1). | |
%% With pattern-matching [does not handle x < 0] | |
fac2(x) -> | |
case x of |
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
int x = 0; | |
x = 2; |
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
type Fruit = | |
| Apple | |
| Orange | |
| Papaya |
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
imetallica@S451LA:~/Projects/squadmarket$ mix phoenix.server | |
web/channels/auth_channel.ex:55: warning: function authorized?/1 is unused | |
web/channels/auth_channel.ex:4: warning: variable payload is unused | |
Compiled web/channels/auth_channel.ex | |
Generated squadmarket app | |
[info] Running Squadmarket.Endpoint with Cowboy on http://localhost:4000 | |
22 Dec 21:22:14 - info: compiled 14 files into 2 files, copied 21 in 1750ms | |
Setting up watches. Beware: since -r was given, this may take a while! | |
[info] JOIN auth:auth to Squadmarket.AuthChannel | |
Transport: Phoenix.Transports.WebSocket |
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
1> [97,98,99]. | |
"abc" |
OlderNewer