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 61-70 of 300 results.
IDPlCodelangPlGroupPlItemTitleCode 
 
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
266MS Access VBAArrayDictionary Basics' empty dict Dim myDict As Dictionary Set myDict = New Dictionary ' some static values myDict.Add "key1", "value1" myDict.Add "key2", "valueY" myDict.Add "keyX", "value98" ' update a key programmatically myDict.Remove "key1" myDict.Add "key1", "new value" ' iterate Dim strKey As Variant Dim current_key As String Dim strValue As String For Each strKey In myDict.Keys() current_key = strKey strValue = myDict.Keys(strKey) Next ' Exists If myDict.Exists(strKey) Then Debug.Print "yes" End If ' get an specific item Dim subdict As String subdict = myDict.Keys("key2") # valueYView Update Delete
267PowerShellArrayDictionary Basics# empty Hashtable $myDict = @{} # some static values $myDict.Add("key1", "value1") $myDict.Add("key2", "valueY") $myDict.Add("keyX", "value98") # update a key programmatically $myDict.Remove("key1") $myDict.Add("key1", "new value") # iterate Foreach ($key in $myDict.keys) { $strKey = $key $strValue = $Parameter[$key] } # Exists If ($myDict.ContainsKey("key1") -eq $true) { write-host "yes" } # get an specific item $subdict = $myDict("key2") # valueYView Update Delete
193PythonArrayDictionary Basics# empty dict myDict = {} # some static values myDict ={ "key1" : {"item1":"value1"}, "key2" : {"itemX":"valueY"}, "keyX" : {"item99":"value98"} } # update a key programmatically myDict.update({"key1" = {"item2":"new value"}}) # iterate for (key, subdict) in myDict.items(): current_key = key current_subdict = subdict # get an specific item subdict = myDict.get("key2") print subdict.get("itemX") # valueYView Update Delete
191PythonEncoding / Decodingmd5-Hash erzeugen# https://docs.python.org/2/library/hashlib.html import hashlib a = "hello world" b = 0.1 md5str = hashlib.md5(str(b) + a).hexdigest() View Update Delete
190PythonSchleifenWhile Schleifei=10 while i<10: i=i+1 print i View Update Delete
185T-SQLStringsPrüfen ob eine Zahl in einem String enthalten istSELECT value ,CASE WHEN PATINDEX('%[0-9]%',value) > 0 THEN 1 ELSE 0 END AS CheckIfStringContainsANumber FROM ( SELECT 'String w/o a number' AS value UNION ALL SELECT 'This string contains 1 as a number' AS value ) subQuery1 -- value | CheckIfStringContainsANumber -- ------------------------------------------------------------------ -- String w/o a number | 0 -- This string contains 1 as a number | 1View Update Delete
182BatchVariablenDeklaration 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"View Update Delete
272MS Access SQLDatenbankNULL Wert eines Feldes übersteuernSELECT FieldA ,Nz([FieldB,"This field is null") As FieldB_Nz FROM TableAView Update Delete
180T-SQLDatenbankNULL Wert eines Feldes übersteuernSELECT ISNULL(MyColumn1, 1.0) AS MyColumnWithoutNULL;View Update Delete