View merge_sort.cc
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
// Author: Stephan T. Lavavej | |
// Code for "Stephan T. Lavavej - Core C++, 8 of n" from Channel 9 Videos | |
#include <iostream> | |
#include <array> | |
#include <climits> | |
using namespace std; | |
template<int... Vals> |
View kruskal_minimum_spanning_tree.cc
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 <boost/format.hpp> | |
#include <boost/graph/adjacency_list.hpp> | |
#include <boost/graph/kruskal_min_spanning_tree.hpp> | |
#include <iostream> | |
namespace | |
{ | |
namespace b = boost; | |
typedef b::adjacency_list<b::vecS, b::vecS, b::undirectedS, b::no_property, |
View kk.cc
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 <iostream> | |
#include <gmpxx.h> | |
int main(int argc, const char** argv) | |
{ | |
mpz_class res; | |
mpz_fib_ui(res.get_mpz_t(), 20e6); | |
std::cout << res.get_str(10) << std::endl; | |
return 0; | |
} |
View asd.cc
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 <iostream> | |
template<typename T> | |
struct type_trait | |
{ | |
template<typename U> | |
struct pointer_trait | |
{ | |
enum { result = false }; | |
}; |
View server.go
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
package main | |
import ( | |
"encoding/json" | |
"log" | |
"net/http" | |
"runtime" | |
) | |
type Article struct { |
View app.js
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
App = Ember.Application.create({ | |
resolver: Ember.DefaultResolver.extend({ | |
resolveTemplate: function (parsedName) { | |
var template = this._super(parsedName); | |
if (!template) { | |
var templateName = parsedName.fullNameWithoutType.replace(/\./g, "/"), | |
filePath = "/assets/templates/" + templateName + ".js"; | |
$.ajax({ |
View auth.js
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
App.Auth = Ember.Auth.create({ | |
// ... | |
modules: ["emberModel"] | |
}); |
View 1.hs
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
fac :: Int -> Int | |
fac 0 = 1 | |
fac n = n * fac(n - 1) | |
-- fac 100 => 0 | |
View asd.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func offset(tz string) int { | |
if seconds, ok := timeZone[tz]; ok { | |
return seconds | |
} | |
log.Println("unknown time zone:", tz) | |
return 0 | |
} |
View kk.go
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
package main | |
import "fmt" | |
type Opicak struct { | |
Name string | |
Age int | |
} | |
func (b Opicak) PrettyName() string { |
NewerOlder