This file contains hidden or 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
public class Fahrzeug { | |
private double gewicht; | |
private long laufleistung; | |
public double getGewicht() { | |
return gewicht; | |
} | |
public void setGewicht(double gewicht) { | |
this.gewicht = gewicht; | |
} | |
public long getLaufleistung() { |
This file contains hidden or 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
public class Fahrzeug { | |
private double gewicht; | |
private long laufleistung; | |
public double getGewicht() { | |
return gewicht; | |
} | |
public void setGewicht(double gewicht) { | |
this.gewicht = gewicht; |
This file contains hidden or 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
Write-Host "Zählen startet" | |
$z1 = Start-Job { | |
for ($i=0;$i -lt 3;$i++) { | |
"Zaehler 1 ist bei $i" | |
sleep 1 | |
} | |
} | |
$z2 = Start-Job { | |
for ($i=0;$i -lt 6;$i++) { | |
"Zaehler 2 ist bei $i" |
This file contains hidden or 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
public class Main { | |
/** | |
* @param args | |
*/ | |
public static void main(String[] args) { | |
// TODO Auto-generated method stub | |
Zaehler z1 = new Zaehler("Nummer 1", 3); | |
Zaehler z2 = new Zaehler("Nummer 2", 6); | |
z1.start(); |
This file contains hidden or 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
public class Main { | |
/** | |
* @param args | |
*/ | |
public static void main(String[] args) { | |
// TODO Auto-generated method stub | |
Client c1 = new Client("Thomas","mmbbs"); | |
Client c2= new Client("Frank","mbs"); | |
Client c3= new Client("Simone","mmbbs"); |
This file contains hidden or 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
public class Client implements Observer{ | |
private String name; | |
private String pw; | |
public Client(String user,String pw) { | |
this.name=user; | |
this.pw=pw; | |
} |
This file contains hidden or 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]$z=0 | |
$out="" | |
while ($z -le 0) { | |
$z=Read-Host "Dezimalzahl:" | |
} | |
$dezimal=$z | |
while ($z -gt 0) { | |
$diff=$z%8 | |
$out=$out.Insert(0,$diff) | |
$z=($z-$diff)/8 |
This file contains hidden or 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
$ci=New-Object System.Object | Select-Object -Property MACAddress,Architecture,OS,RAM,freeDiskspace,ComputerName | |
$ci.MACAddress=Get-WmiObject win32_networkadapterconfiguration | Where-Object ipaddress | Select-Object -ExpandProperty MACAddress | |
$ci.Architecture=(Get-WmiObject win32_operatingsystem).OSArchitecture | |
$ci.OS=(Get-WmiObject win32_operatingsystem).Caption | |
[double]$ci.RAM=(Get-WmiObject win32_computersystem).totalPhysicalmemory/1gb | |
$ci.freeDiskspace=(Get-WmiObject win32_logicaldisk) | Where-Object {$_.DeviceID -eq "c:"} | Select-Object -ExpandProperty FreeSpace | |
$ci.ComputerName=$env:COMPUTERNAME | |
$ci |
This file contains hidden or 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
function ipinfo($ip) { | |
$ip | |
[int[]]$x = $ip.Split(".") | |
if($x[0] -le 127) | |
{ | |
"Class A" | |
} | |
elseif($x[0] -gt 127 -and $x[0] -le 191) | |
{ | |
"Class B" |
This file contains hidden or 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
# Login | |
Invoke-WebRequest "http://192.168.178.29/mmbbsapp/news.php?user=mmbbs&password=mmbbs" -SessionVariable s | |
# Logout | |
Invoke-WebRequest "http://192.168.178.29/mmbbsapp/news.php?cmd=logout" -WebSession $s | |
# Abfrage letzte News | |
Invoke-WebRequest http://192.168.178.29/mmbbsapp/news.php -WebSession $s | |
# Abfragen News ab ID | |
Invoke-WebRequest http://192.168.178.29/mmbbsapp/news.php?id=2 -WebSession $s | |
# Eintragen einer News | |
Invoke-WebRequest "http://192.168.178.29/mmbbsapp/news.php?Headline=Überschrift&Text=Dies ist ein Text mit öäü" -WebSession $s |