Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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" | |
"math/rand" | |
"os" | |
"strings" | |
"time" | |
"unicode" | |
) |
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
def measure(liste): | |
if not liste: | |
nimm_spektrum_auf() | |
return | |
param, tail = liste[0], liste[1:] # ich glaub, so kann man des schreiben | |
name, values = param #jetzt ist name z B. = "magnetfeld" und values die Werte dafür | |
for v in values: | |
set(**{name:v}) | |
measure(tail) | |
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
import smtplib | |
msg = """From: <[email protected]>\r\nTo: <[email protected]>\r\n\r\nTest test test test""" | |
server = smtplib.SMTP('gmail-smtp-in.l.google.com') | |
server.set_debuglevel(1) | |
server.sendmail("[email protected]", ["[email protected]"], msg) | |
server.quit() |
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 ( | |
"syscall/js" | |
) | |
func main() { | |
document := js.Global().Get("document") | |
table := document.Call("getElementById", "myTable") |
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
jannis@fsmath seee $ bundle exec irb | |
1.9.3p194 :001 > require "./web/config/environment.rb" | |
=> true | |
1.9.3p194 :002 > m = Postoffice.ankuendigungsmail(1078) | |
Strahlungstransport in der Erdatmosphäre | |
ActionView::Template::Error: incompatible character encodings: ASCII-8BIT and UTF-8 | |
from /home/jannis/.rvm/gems/ruby-1.9.3-p194@gnt-eval/gems/activesupport-3.2.11/lib/active_support/core_ext/string/output_safety.rb:135:in `concat' | |
from /home/jannis/.rvm/gems/ruby-1.9.3-p194@gnt-eval/gems/activesupport-3.2.11/lib/active_support/core_ext/string/output_safety.rb:135:in `concat' | |
from /home/jannis/.rvm/gems/ruby-1.9.3-p194@gnt-eval/gems/actionpack-3.2.11/lib/action_view/buffers.rb:11:in `<<' | |
from /home/jannis/seee/web/app/views/postoffice/ankuendigungsmail.de.text.erb:13:in `_app_views_postoffice_ankuendigungsmail_de_text_erb__1759068597082261996_30296460' |
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
Consider N non-interacting point particles with mass m in a volume V. | |
The volume is divided into three distinct subvolumes V₁, V₂ and V₃ with V = V₁ + V₂ + V₃. | |
The particles can move freely between the subvolumes. | |
The Hamiltonian of the system is | |
H = H₁(𝔯₁, 𝔭₁) + … + Hᵤ(𝔯ᵤ, 𝔭ᵤ) with Hᵢ = 𝔭ᵢ²/2m + U(𝔯ᵢ) (u = N, unicode lacks a subscript N) | |
where |
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 <stdio.h> | |
#include <stdlib.h> | |
typedef union _data | |
{ | |
int i; | |
double d; | |
void *ptr; | |
} data_t; |
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 compare_some_strings (char *a, char *b) | |
// compare some strings, return -1 if equal, otherwise the position of the first difference. | |
{ | |
int i; | |
for (i = 0; a[i] != 0 && b[i] != 0; i++) | |
if (a[i] != b[i]) | |
return i; | |
// wenn wir hier angekommen sind, sind sie bis zum Punkt i gleich | |
if (a[i] == 0 && b[i] == 0) // sie sind ganz gleich |
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
divides :: Int -> Int -> Bool | |
d `divides` n = n `mod` d == 0 | |
schaltjahr :: Int -> Bool | |
schaltjahr n | 400 `divides` n = True | |
| 100 `divides` n = False | |
| 4 `divides` n = True | |
| otherwise = False |
NewerOlder