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 281-290 of 300 results.
IDPlCodelangPlGroupPlItemTitleCode 
 
229PowerShellStringsString nach einem Teilstring durchsuchen# See also a good hint with explanation between like and contains: # http://windowsitpro.com/blog/powershell-contains $fullstring = "This is my string"; if ($fullstring -like "*my*") { Write-Host "found" -ForegroundColor Green; } else { Write-Host "nope" -ForegroundColor Red; }View Update Delete
234PowerShellDatum, ZeitAktuelles Datum/Uhrzeit $myDate=Get-Date -format "yyyy-MM-dd hh:mm"; write-host $myDate -Foregroundcolor Cyan; # 2014-01-14 10:15 # Maybe AM or PM # For 24h Version $myDate=Get-Date -format "yyyy-MM-dd HH:mm"; write-host $myDate -Foregroundcolor Cyan; # 2014-01-14 22:15View 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
254PowerShellFilehandlingAlle Dateien aus Verzeichnis auslesen$CSVFullPath = "C:\Temp" $FileFilter = "*.csv" $ListOfFiles = (Get-ChildItem -Path $CSVFullPath -Filter $FileFilter) | Select Name, BaseName, DirectoryName, FullName, Extension $ListOfFiles.Name View Update Delete
255PowerShellFilehandlingVerzeichnis rekursiv durchsuchen$CSVFullPath = "C:\Temp" $FileFilter = "*.*" $ListOfFiles = (Get-ChildItem -Path $CSVFullPath -Filter $FileFilter -Recurse) | Select Name, BaseName, DirectoryName, FullName, Extension | Where {$_.DirectoryName -like "*not_processed*" } $ListOfFiles.FullNameView Update Delete
262MS Access SQLDatenbankCTAS-- Sollte die Zieltabelle (myDestinationTable) bereits vorhanden sein -- wird diese überschrieben (neue Strukturen werden übernommen) SELECT * INTO myDestinationTable FROM mySourceTableView Update Delete
272MS Access SQLDatenbankNULL Wert eines Feldes übersteuernSELECT FieldA ,Nz([FieldB,"This field is null") As FieldB_Nz FROM TableAView 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
283Yii2DatenbankVerzeichnis erstellen<?php // Example as SQL: // SELECT * FROM MainTable // WHERE fieldA=5 AND fieldB IN (SELECT id FROM SubTable WHERE fieldC=551) $fieldC = 551; $SubTable_idQry = SubTable::find()->select('id')->where(['fieldC' => $fieldC]); // Static way: $fieldA = 5; // As result: $fieldA = ThirdTable::find() ->select('fieldA_Reference') ->where(['fieldC' => $fieldC]) ->one(); $MainTableResultQry = MainTable::find() ->where(['in', 'fieldB', $SubTable_idQry]) ->andWhere(['fieldA' => $fieldA]) ->all(); ?>View Update Delete
284Yii2DatenbankAbfrage mit Aggregration<?php /* // Example as SQL SELECT FieldA ,COUNT(FieldA) as cnt FROM MainTable WHERE FieldA = 5 GROUP BY FieldA */ $MainTableResultQry = MainTable::find() ->select(['FieldA', 'COUNT(FieldA) as cnt']) ->where(['FieldA' => 5]) ->groupBy(['FieldA']) ->createCommand() ->queryAll(); ?>View Update Delete