You may optionally enter a comparison operator (<, <=, >, >=, <> or =) at the beginning of each of your search values to specify how the comparison should be done.
--http://msdn.microsoft.com/de-de/library/ms189794.aspx
SELECT DATEDIFF(second, '2005-12-31 23:59:59.9999999', '2006-01-01 00:00:00.0000000') AS Seconds
174
Bash Script
Strings
Strings miteinander verbinden
# http://wiki.ubuntuusers.de/Shell/Bash-Skripting-Guide_f%C3%BCr_Anf%C3%A4nger#Variablen-abgrenzen
#!/bin/bash
subString1="Hello"
subString2='World!'
echo "${subString1} ${subString2}"
Hello World!
echo "${subString1} ${subString2}. I'm in here ;-)"
# Hello World!. I'm in here ;-)
175
Bash Script
Filehandling
Verzeichnis rekursiv durchsuchen
# http://wiki.ubuntuusers.de/Shell/Bash-Skripting-Guide_f%C3%BCr_Anf%C3%A4nger#Variablen-Teil-2
#!/bin/bash
for file in /home/myUser/*/*.png ; do
echo "Diese Datei: $file"
fname=$(basename "$file")
echo "hat den Namen: $fname"
fdir=$(dirname "$file")
echo "und steht im Verzeichnis: $fdir"
# Diese Datei: /home/myUser/galaxy.png
# hat den Namen: galaxy.png
# und steht im Verzeichnis: /home/myUser
176
Bash Script
Filehandling
Prüfen ob Datei existiert
# http://wiki.ubuntuusers.de/Shell/Bash-Skripting-Guide_f%C3%BCr_Anf%C3%A4nger#If-Else-Anweisung
#!/bin/bash
filePath="/home/myUser/test.txt"
if [ -f ${filePath} ]
then
echo "There it is! ;-)"
else
echo "Whow, file is missing at this place :-("
fi
177
Delphi
Filehandling
Prüfen ob Datei existiert
procedure TForm1.CheckIfFileExists();
var
filePath : String;
begin
filePath:='C:\User\myUser\text.txt';
if FileExists(filePath) then
begin
ShowMessage('There it is! ;-)');
end
else
begin
ShowMessage('Whow, file is missing at this place :-(');
end;
end;
178
C#
Filehandling
Prüfen ob Datei existiert
String filePath = "C:\\User\\myUser\\text.txt";
if (System.IO.File.Exists(filePath))
{
MessageBox.Show("There it is! ;-)");
}
else
{
MessageBox.Show("Whow, file is missing at this place :-(");
}
179
PHP
Filehandling
Prüfen ob Datei existiert
$filePath = "/home/myUser/test.txt";
if (file_exists($filePath))
{
echo "There it is! ;-)"
}
else
{
"Whow, file is missing at this place :-("
}
180
T-SQL
Datenbank
NULL Wert eines Feldes übersteuern
SELECT ISNULL(MyColumn1, 1.0) AS MyColumnWithoutNULL;
181
PL/pgSQL
Datenbank
NULL Wert eines Feldes übersteuern
SELECT COALESCE(MyColumn1, 1.0) AS MyColumnWithoutNULL;
182
Batch
Variablen
Deklaration einer Variable
@echo off
SET myVariable=This is my content
SET myPathVariableWithBlanks="C:\Temp\Path With Blanks\File.txt"
echo %myVariable%
REM This is my content
echo %myPathVariableWithBlanks%
REM "C:\Temp\Path With Blanks\File.txt"