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 201-210 of 300 results.
IDPlCodelangPlGroupPlItemTitleCode 
 
203JavaFilehandlingTernary operatorString thisVar = "OK"; boolean resultVar; resultVar = thisVar.equals("OK") ? true : false; // same as if-else construction if (thisVar.equals("OK")) { resultVar = true; } else { resultVar = false; }View Update Delete
204PythonFallunterscheidungTernary operatorthisVar = "OK" resultVar = False # [on_true] if [cond] else [on_false] resultVar = True if thisVar == "OK" else False // same as if-else construction if (thisVar == "OK"): resultVar = True else: resultVar = FalseView Update Delete
205MySQLDatum, ZeitTagesnameSELECT DAYNAME(NOW()); -- Monday SELECT DAYNAME('2014-08-10'); -- Sunday -- To get localized names switch the parameter, e.g. to German SET lc_time_names = 'de_DE'; SELECT DAYNAME('2014-08-10'); -- SonntagView Update Delete
206MySQLDatenbankTabelle DB übergreifend kopierenDROP TABLE IF EXISTS `DestinationDB`.`Table1`; CREATE TABLE `DestinationDB`.`Table1` SELECT * FROM `SourceDB`.`Table1`;View Update Delete
207T-SQLDatenbankManuell einen AutoIncrement/Identity/Serial Wert in Tabelle einfügenSET IDENTITY_INSERT myTable ON INSERT INTO myTable(Identity_ID, Value) VALUES (4711, 'Back To The Future...') SET IDENTITY_INSERT myTable OFFView Update Delete
208PL/pgSQLDatenbankTabelleinhalt DB übergreifend kopieren-- siehe auch: http://stackoverflow.com/questions/6083132/postgresql-insert-into-select -- in DestinationDB do: INSERT INTO Table1 SELECT id, valuefield FROM dblink('dbname=SourceDB', 'SELECT id, valuefield FROM Table1') AS t(id integer, valuefield varchar(100)); View Update Delete
209SQLiteDatum, ZeitKalenderwoche eines Datums-- Standard Weeknumber function from SQLite: -- http://www.sqlite.org/lang_datefunc.html SELECT strftime('%W', '2014-08-25') -- The above calculation can lead to an wrong number if you expect an iso calendar week. -- Therefore better: -- http://stackoverflow.com/questions/15082584/sqlite-return-wrong-week-number-for-2013 SELECT (strftime('%j', date('2014-08-25', '-3 days', 'weekday 4')) - 1) / 7 + 1 AS ISOCalendarWeekNumber;View Update Delete
210T-SQLDatum, ZeitKalenderwoche eines Datumsselect DATEPART(ISO_WEEK,CAST('2014-08-25' AS DATE))View Update Delete
211SQLiteDatum, ZeitJahr aus Datum extrahierenSELECT strftime('%Y', '2014-08-25') AS Year;View Update Delete
212SQLiteDatum, ZeitTagesname-- There is no build in solution. Because of this you have to build a solution out of the weekday. -- Be careful, the first weekday (0) is a sunday SELECT ,CASE CAST(strftime('%w', myDateField) as integer) WHEN 0 then 'Sonntag' WHEN 1 then 'Montag' WHEN 2 then 'Dienstag' WHEN 3 then 'Mittwoch' WHEN 4 then 'Donnerstag' WHEN 5 then 'Freitag' WHEN 6 then 'Samstag' ELSE '????????????????????' END AS Tag_der_Woche_Deutsch ,CASE CAST(strftime('%w', myDateField) as integer) WHEN 0 then 'Sunday' WHEN 1 then 'Monday' WHEN 2 then 'Tuesday' WHEN 3 then 'Wednesday' WHEN 4 then 'Thursday' WHEN 5 then 'Friday' WHEN 6 then 'Saturday' ELSE '????????????????????' END AS Day_of_week_EnglishView Update Delete