Site Tools


onny:notizen:programmierung

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
onny:notizen:programmierung [2023/10/24 10:51] – [css] 127.0.0.1onny:notizen:programmierung [2026/06/30 13:24] (current) – [php] 10.250.0.1
Line 205: Line 205:
 </code> </code>
 ===== javascript ===== ===== javascript =====
 +
 +conditional properties in object
 +<code javascript>
 +cont my_object = {
 +  ...(version >= 33 ? { iconSvgInline: MindMapSvg } : { iconClass: 'icon-mindmap' }),
 +}
 +</code>
  
 split up javascript files split up javascript files
Line 516: Line 523:
  
 ===== php ===== ===== php =====
 +
 +printf string
 +<code php>
 +printf("cleaning criteria: %s\n", $config['filterCriteria']);
 +</code>
 +
 +print array
 +<code php>
 +$a = array ('a' => 'apple', 'b' => 'banana', 'c' => array ('x', 'y', 'z'));
 +print_r($a);
 +</code>
 +
 +assosiative array / dictionary
 +<code php>
 +$myResult["ids"] = [123, 125, 127];
 +</code>
 +
 +datetime object, convert to string
 +<code php>
 +$date = new \DateTime('1990-01-01');
 +$dateString = $date->format('d.m.Y');
 +</code>
 +
 enable debugging / error log enable debugging / error log
 <file - /etc/php/conf.d/debug.ini> <file - /etc/php/conf.d/debug.ini>
Line 746: Line 776:
 </code> </code>
 ===== sql ===== ===== sql =====
-Update field: 
-<code sql> 
-update forwardings set destination='alex.bloss@online.de' where 'destination=bloss@bigwood.de'; 
-</code> 
-Insert field: 
-<code sql> 
-insert into forwardings (source, destination) VALUES ('markus.heim@wew-heim.de', 'heimmarkus@yahoo.de'); 
-insert into forwardings VALUES ('markus.heim@wew-heim.de', 'heimmarkus@yahoo.de'); 
-</code> 
-Delete row: 
-<code sql> 
-delete from domains where domain='alex-vt.de'; 
-</code> 
 <code sql> <code sql>
 mysql> \P /usr/bin/less mysql> \P /usr/bin/less
onny/notizen/programmierung.1698144674.txt.gz · Last modified: by 127.0.0.1