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/log/trivial.hpp> | |
int main(int, char*[]) | |
{ | |
BOOST_LOG_TRIVIAL(trace) << "A trace severity message"; | |
BOOST_LOG_TRIVIAL(debug) << "A debug severity message"; | |
BOOST_LOG_TRIVIAL(info) << "An informational severity message"; | |
BOOST_LOG_TRIVIAL(warning) << "A warning severity message"; | |
BOOST_LOG_TRIVIAL(error) << "An error severity message"; | |
BOOST_LOG_TRIVIAL(fatal) << "A fatal severity message"; |
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
/** | |
* Our data structure (e.g., a linked list) | |
*/ | |
template <class ValueType>; | |
class MyDataStructure { | |
/** | |
* Inner class that describes a const_iterator and 'regular' iterator at the same time, depending | |
* on the bool template parameter (default: true - a const_iterator) | |
*/ | |
template<bool is_const_iterator = true> |
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 | |
// Simple tool which lists the entity kinds, and a sample for each, for an | |
// app engine app. | |
// | |
// This tool can be invoked using the goapp tool bundled with the SDK. | |
// $ goapp run demos/remote_api/datastore_info.go \ | |
// -email [email protected] \ | |
// -host [email protected] \ | |
// -password_file ~/.my_password |
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" | |
func main() { | |
var germany_goals = 7 | |
var brasil_goals = 1 | |
fmt.Printf("Germany:Brasil, wynik: %d:%d\n", germany_goals, brasil_goals) | |
} |
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" | |
func main() { | |
var pierwsza_liczba int | |
fmt.Print("Podaj pierwsza liczbe: ") | |
_, _ = fmt.Scanf("%d", &pierwsza_liczba) | |
fmt.Println("pierwsza_liczba = ", pierwsza_liczba) | |
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/random.hpp> | |
#include <boost/random/normal_distribution.hpp> | |
#include <boost/random/random_device.hpp> | |
#include <boost/random/uniform_real.hpp> | |
double BoostRandom(double dummy) { | |
static boost::random_device rd; | |
static boost::mt19937 rng(rd()); | |
// static boost::normal_distribution<> nd(0.0, 1.0); | |
// return nd(rng); |
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" | |
"log" | |
"os" | |
"net/http" | |
"code.google.com/p/google-api-go-client/drive/v2" | |
"code.google.com/p/goauth2/oauth" | |
) |
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
# don't put duplicate lines in the history. See bash(1) for more options | |
# ... or force ignoredups and ignorespace | |
HISTCONTROL=ignoredups:ignorespace | |
# append to the history file, don't overwrite it | |
shopt -s histappend | |
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) | |
HISTSIZE=20000 | |
HISTFILESIZE=50000 |
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
// Projekt6.1.1 | |
package main | |
import "fmt" | |
func NWD(a, b int) int { | |
var w int | |
for w == 0 { | |
if a > b { |
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
// Projekt6.1.1 | |
package main | |
import "fmt" | |
func NWD(A1, B1 int) int { | |
var W int | |
for W == 0 { |