
nested loops
WP Array Search
<?php
/*
Plugin Name: MyWPArraySearch
Description: Lists elements of array as hot links searching wordpress.org.
Version: 0.0.1
Author: Gary Garchar
*/
add_shortcode( 'MyWPArraySearch', 'myTableFun' );
// [MyWPArraySearch nColumns=3]
function myTableFun( $atts ) {
$a = shortcode_atts(array('nColumns' => '3'), $atts);
$nColumns = $a['nColumns'];
$array = array(
"Accessability",
"Admin",
"Aesthetics",
"Anti-Spam",
"Archives",
"Backup",
"Blocks",
"Child-Themes",
"CMS",
"Comments",
"Contact-Form",
"Content-Analysis",
"Custom-Post-Types",
"Customizer",
"Development",
"eCommerce",
"Editor",
"Feedback",
"Filters",
"Flexbox",
"Forums",
"Frameworks",
"Galleries",
"Google",
"Gutenberg",
"Hooks",
"HTML5",
"i18n",
"Installation",
"Javascript",
"jQuery",
"Keywords",
"l10n",
"Mapping",
"Math",
"Media",
"Metadata",
"Mobile",
"Multisite",
"MySQL",
"Page-Builder",
"Permalinks",
"PHP",
"Plugins",
"Profit",
"REACT",
"Readability",
"Related-Posts",
"Responsiveness",
"REST",
"Reusable",
"Security",
"SEO",
"Shortcode",
"Sitemap",
"Spam",
"SSL",
"Support",
"Tags",
"Templates",
"Theme",
"Themes",
"Tools",
"UML",
"UX",
"Widgets",
"WordCamp",
"WP_Query",
"XML",
);
$h = "<table class='wp-block-table'>";
$h .= "<caption>WordPress Search</caption>";
$h .= "<tr>";
foreach ($array as $value) {
$newRow = (++$i % $nColumns) == 0;
$h .= '<td><a href="https://wordpress.org/search/';
$h .= $value;
$h .= '" target="_blank">';
$h .= $value;
$h .= "</a></td>";
if($newRow) $h .= "</tr><tr>";
}
$h .= "</tr>";
$h .= "</table>";
return $h;
}
/*
.author {display:none;}
.site-title {font-family: sans-serif; font-style:italic}
caption {text-align: center;}
caption {
background-color: green;
color: white;
text-align: right;
}
td { text-align: right; }
.wp-block-table tr:hover { background-color: #ddd;}
*/
Rysnc Backup Script

~/Desktop/bin/myRsync "Orange/Users/groggygarbad/Documents/databases2/" "TTD" "4GB-CARD"
#!/bin/sh
# DESTINATION USES SAME PATH AS SOURCE
# EXAMPLE: myRsync "Lemon/Users/GG5/Sites/" "ZapMap2" "Lexar"
# EXAMPLE: ~/Desktop/bin/myRsync "Orange/Users/groggygarbad/Documents/databases2/" "TTD" "4GB-CARD"
if [ $# -ne 3 ]; then
echo 1>&3 Error, Usage: $0 sourcePath theDirectory destVolume
exit 127
fi
theDate=`date '+%y%m%d%H%M%S'`
theIncr="/Volumes/$3/$1/$2-$theDate"
theProg="/Volumes/$3/$1/progress.txt"
#theProg="/Volumes/$3/progress.txt"
echo "~/bin/myRsync"
echo "----------------------------------------------------------------------------------------" > "$theProg"
echo; echo; echo "/Volumes/$1$2 -> $theDate" >> "$theProg"
rsync -ablPvz --backup-dir="$theIncr" --delete --progress "/Volumes/$1$2/" "/Volumes/$3/$1/$2" >> "$theProg"
echo "---------------------------------------------------------------------------------------" >> "$theProg"
cat "$theProg"
exit
Unordered List
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Example document</title>
</head>
<body>
<p>Example paragraph</p>
</body>
</html>
- Competition
- Delivery
- Pricing
- Service
- Productivity
- Labor
- Material
- Capital
- Control
- Resources
- Operations
- Competition
- Delivery
- Pricing
- Service
- Productivity
- Labor
- Material
- Capital
- Control
- Resources
- Operations
<ul><li>Competition<ul><li>Delivery</li><li>Pricing</li><li>Service</li></ul></li><li>Productivity<ul><li>Labor</li><li>Material</li><li>Capital</li></ul></li><li>Control<ul><li>Resources</li><li>Operations</li></ul></li></ul>
Bezier Miter Join
When line segments join at sharp angles “spikes” are produced. This test image shows at which range they are cut off.
%!PS BezierMiterJoin.ps 2 2 scale 20 20 translate /a 10 def 0 20 280 { /x exch def 0 0 moveto x 300 lineto 100 200 200 100 300 0 curveto } for 10 setlinewidth strokepath 0 setlinewidth stroke showpage
Cascade
[sourcecode language=”bash”]
# CASCADE
#set whatever "•[-{wordset} 0-9]*∂t"
set whatever "•[-{wordset}., ”&]*∂t" #NEED THE TAB?
find /{whatever}/
set theString "`catenate §`"
loop
find /{whatever}/
if "`catenate §`" == "∂t"
replace § "{theString}"
else
set theString "`catenate §`"
replace § "*"
end
if "{theString}" == ""
break
end
end
[/sourcecode]
Weeks between dates
If you consider 4/1/2011 to 4/7/2011 as one week, and 4/1/2011 to 4/8/2011 as 1w1d, then:
Int ( ( date2 – date1 + 1 ) / 7 ) & “w” & Mod ( date2 – date1 + 1; 7 ) & “d”
Insert Time at End of Text
If [ Get ( ActiveFieldName ) = “Task” ]
Set Selection [ End Position: Get ( ActiveSelectionSize ) ]
Insert Calculated Result [ ” <- ” & Get ( CurrentTimeStamp ) ]
End If
disable HTML tags
To get “<BR>” in your blog’s posting, enter this code in HTML :
“<BR>”
Character entity references start with ampersand.