(.*?)(\[.*?\]) findet in
meine [version] und mein [key] bla [key2] was
3 matches mit jeweils 2 gruppen
testen: https://regex101.com/r/4el4Oq/1
meine Sys/Db admin & Developper Notitzen - wer Rechtschreibfehler findet darf sie behalten ... my Sys/Db Admin and developper notes - I don't care about typos
(.*?)(\[.*?\]) findet in
meine [version] und mein [key] bla [key2] was
3 matches mit jeweils 2 gruppen
testen: https://regex101.com/r/4el4Oq/1
$cred=Get-Credential
Enter-PSSession -ComputerName myhost -Credential $cred
$WebRequest = [System.Net.WebRequest]::Create("https://www.google.at/")
$WebRequest.Method = "GET"
#$WebRequest.ContentType = "application/json"
$Response = $WebRequest.GetResponse()
$ResponseStream = $Response.GetResponseStream()
$ReadStream = New-Object System.IO.StreamReader $ResponseStream
$Data=$ReadStream.ReadToEnd()
Write-Host "Data=$Data"
openrowset dient zum öffnen von externen datenquellen, die dann wie eine tabelle in der from Klausel verwendet werden können. Es gibt 2 Syntaxe:
ALTER PROCEDURE [dbo].[InsertFile]
(
@filename nvarchar(max),
@filepath nvarchar(max)
)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
declare @sqlStr nvarchar(max)
set @sqlStr='INSERT INTO [dbo].StpFile ([name],[file_stream]) SELECT '''+@filename+''',* FROM OPENROWSET(BULK '''+@filepath+''', SINGLE_BLOB) AS FileData'
Print @sqlStr
execute (@sqlStr)
END
select * from openrowset('SQLNCLI', 'Server=.\sqlexpress;Trusted_Connection=yes;','exec sp_databases') order by Database_size desc
sp_configure 'show advanced options', 1;
RECONFIGURE;
GO
sp_configure 'Ad Hoc Distributed Queries', 1;
RECONFIGURE;
GO
bcp "select name from mydb.dbo.testtable" queryout test.txt -S localhost\SqlExpress -T -c
-S Server
-T trusted connection, oder -U username -P password
-c character Format oder -n native -N unicode native -w Unicode character Format
wenn kein Format (c,n,N,w) angegeben frägt bcp wie es jedes Feld abspeichern soll
die Präfix Länge muß 0 sein, sonst wird etwas zum File hinzugeschrieben !!!
C:\temp>bcp "select file_stream from mydb.dbo.MyFile where name like 'Configuration_598784a8-346a-4b7b-9817-2c7def67d1aa_Draft.zip'" queryout test.zip -S localhost\SqlExpress -TEnter the file storage type of field file_stream [varbinary(max)]:Enter prefix-length of field file_stream [8]: 0Enter length of field file_stream [0]:Enter field terminator [none]:Do you want to save this format information in a file? [Y/n] yHost filename [bcp.fmt]:Starting copy...1 rows copied.Network packet size (bytes): 4096Clock Time (ms.) Total : 1 Average : (1000.00 rows per sec.)1) mit Visual Studio Installer die Data Tools installlieren
2) unter Erweiterungen Reporting Service Editor installieren
Import java files to project:
File / Project Stucture (Crt Alt_Shft S):
Project: Project SDK auswählen, Project Language Level auf SDK default (ganz oben im Drop Down) stellen
compiler Output Dir eintragen
| aktion | intellij | visual studio |
| collapse to definitions | Crt Shift - | Crt M O |
| find usages / references | Alt F7 | CRT K R |
macht die lokalen Änderungen rückgängig und setzt auf den HEad zurück
https://tutorials-raspberrypi.de/raspberry-pi-ueberwachungskamera-livestream-einrichten/
sudo apt-get install motion -y lsusbls /dev/video*
bei meinem raspy zero schaltet sich seit einiger zeit (vermutlich ab einem update) das wlan immer wieder aus - habe nun zu /etc/rc.local (bei jedem boot) vor exit 0 hinzugefügt:
/sbin/iwconfig wlan0 power off
damit sollte bei iwconfig power management off sein
wlan commandos: iwlist, iwconfig
ssh-keygen
keinen filenmae eingeben => default id_rsa und id_rsa.pup werden erzeugt
kein passwort vergeben, damit später ohne pwd nutzbar
ssh-copy-id "user@hostname.example.com -p <port-number>Vorraussetzung: apache installiert
sudo su
apt install smokeping
reboot
website sollte nun sichtbar sein:
http://192.168.1.151/cgi-bin/smokeping.cgi
etwas warten, dann sollten Daten zu sehen sein:
http://192.168.1.151/cgi-bin/smokeping.cgi?target=Local
in cd /etc/smokeping/config.d/
nano Targets
am Ende unter Local Maschine z.b. gateway hinzufügen:
++gateway1
host=192.168.1.1
dann wieder reboot,
smokeping reload und smokeping restart haben nichts gebracht
https://community.spiceworks.com/how_to/96949-raspberrypi-rpi-smokeping-setup-and-configuration
public static String GetWebResponse(String urlStr) throws Exception
{
URL url = new URL(urlStr);
// Open a connection(?) on the URL(??) and cast the response(???)
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
// Now it's "open", we can set the request method, headers etc.
connection.setRequestMethod("GET");
//String baseAuth=BuildBaseAuthentication("testuser","testpwd");
connection.setRequestProperty("Authorization", "Basic aGV3bTpOb3YxMCE/IQ==");
connection.setRequestProperty("Content-Type", "application/json");
BufferedReader in = new BufferedReader(
new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
return content.toString();
}
public static String BuildBaseAuthentication(String name, String password)
{
String authString = name + ":" + password;
byte[] authEncBytes = Base64.getEncoder().encode((authString.getBytes()));
String authStringEnc = new String(authEncBytes);
System.out.println("Base64 encoded auth string: " + authStringEnc);
return "Basic " +authStringEnc;
}
welcher Prozeß belegt Port 80 ?
netstat -ano | findstr /r 0.0:80
dann killen mit
taskkill /pid 4244 /f
1) Datei HelloWorld.java erstellen:
public class HelloWorld
{
public static void main (String[] args)
{
// Ausgabe Hello World!
System.out.println("Hello World!");
}
}
2) kompelieren mit :
javac HelloWorld.java
sollte file HelloWorld.class erzeugen
3) ausführen mit:
java HelloWorld