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
#!/bin/bash | |
# 1. Save file as go_install.sh | |
# 2. chmod +x go_install.sh | |
# 3. ./go_install.sh | |
# 4. Profit. | |
# Get Go package | |
PKGNAME=go1.3.3.linux-amd64.tar.gz | |
rm -f $PKGNAME | |
wget https://storage.googleapis.com/golang/$PKGNAME |
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 { | |
for a != b { | |
if a > b { | |
a = a - b | |
} else { |
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 { | |
for { | |
if a > b { | |
a = a - b | |
} else 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(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 { |
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
# 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
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
#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" | |
func main() { | |
var pierwsza_liczba int | |
fmt.Print("Podaj pierwsza liczbe: ") | |
_, _ = fmt.Scanf("%d", &pierwsza_liczba) | |
fmt.Println("pierwsza_liczba = ", pierwsza_liczba) | |