Manage PlItems

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.

Advanced Search
Displaying 241-250 of 300 results.
IDPlCodelangPlGroupPlItemTitleCode 
 
243Bash ScriptDatum, ZeitGestriges Datum#!/bin/sh myDate=$(date +"%Y-%m-%d" -d "yesterday") echo $myDate # 2014-01-13 myDate2=$(date -d @$(( $(date +"%s") - 86400)) +"%Y-%m-%d") # 014-01-13 # today: $(date +"%Y-%m-%d") # 2014-01-14 # Hint: -d parameter doesn't work on Solaris View Update Delete
244T-SQLDatenbankSQL SELECT Statische WerteSELECT * FROM ( VALUES (1, 2), (3, 4) ) AS q (col1, col2) GO -- the same as: SELECT 1 AS col1, 2 AS col2 UNION ALL SELECT 3 AS col1, 4 AS col2 GO -- col1 | col2 -- =========== -- 1 | 2 -- ----------- -- 3 | 4 View Update Delete
245PL/pgSQLDatenbankSQL SELECT Statische WerteSELECT * FROM ( VALUES (1, 2), (3, 4) ) AS q (col1, col2) ; -- the same as: SELECT 1 AS col1, 2 AS col2 UNION ALL SELECT 3 AS col1, 4 AS col2 ; -- col1 | col2 -- =========== -- 1 | 2 -- ----------- -- 3 | 4 View Update Delete
246Bash ScriptFilehandlingFilename-Manipultation Basics#!/bin/sh myFilename="$1" # or myFilename="/tmp/Test/myFile.txt" # Get only the path path_only=$(dirname "$myFilename") # /tmp/Test # if it is a local file in the path, then . will be prompted e.g. myFilename="myFile.txt" # Filename only filename_only=$(basename "$myFilename") # myFile.txt # get only filename without extention filename_without_ext="${filename_only%.*}" # myFile # get only the extension filename_extention_only="${myFilename##*.}" # txt # put them together again myFilename_together="${path_only}/${filename_without_ext}.${filename_extention_only}" # /tmp/Test/myFile.txtView Update Delete
247ORACLE PL/SQLDatenbankCSV erstellenSELECT FieldA, LISTAGG(CSVItem, ',') WITHIN GROUP (ORDER BY FieldA) AS Members FROM TableWithItems GROUP BY FieldA;View Update Delete
248PowerShellFallunterscheidungTernary operator## Example from here: https://www.kongsli.net/2012/02/23/powershell-another-alternative-to-ternary-operator/ $thisVar='OK' $resultVar = @{$true=1;$false=2}[$thisVar -eq 'OK'] // same as if-else construction if ($thisVar -eq 'OK') { $resultVar = 1; } else { $resultVar = 2; }View Update Delete
249PythonSysteminfoBetriebssystem ermittelnimport os os.name # nt, posix import platform platform.system() # 'Windows', 'Linux', 'Darwin' platform.release() # Linux, Windows, Windows, Darwin '2.6.22-15-generic', 'Vista' ,'10', '8.11.1' # Example from https://stackoverflow.com/questions/1854/python-what-os-am-i-running-on from sys import platform as _platform if _platform == "linux" or _platform == "linux2": # linux elif _platform == "darwin": # MAC OS X elif _platform == "win32": # Windows elif _platform == "win64": # Windows 64-bitView Update Delete
250PHPStringsErster Buchstable Groß in Wort$myString = "nothingspecial"; $uc = ucwords($myString); echo $uc; // NothingspecialView Update Delete
251PythonStringsErster Buchstable Groß in Wort# Siehe auch: http://www.php2python.com/wiki/function.ucwords/ myString = "nothingspecial" import string uc = string.capwords(myString) print(uc) # NothingspecialView Update Delete
252PythonDateihandlingTextdatei schreiben# Modes # r: Read mode which is used when the file is only being read # w: Write mode which is used to edit and write new information to the file (any existing files with the same name will be erased when this mode is activated) # a: Appending mode, which is used to add new data to the end of the file; that is new information is automatically amended to the end # r+: Special read and write mode, which is used to handle both actions when working with a file myFile = open("myFile.txt","w") myFile.write("Hello World") myFile.close() View Update Delete