tag:blogger.com,1999:blog-63076078318157698302024-03-13T15:07:35.568-07:00Useful CodeUseful code snippets for CSS, Excel, HTML, Java, JavaScript, Regular Expressions, and SQLTom Beekhttp://www.blogger.com/profile/11214111493303257906noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-6307607831815769830.post-51506601965975244832021-12-12T18:34:00.003-08:002021-12-12T18:34:20.078-08:00Access Expert Tutorial<iframe frameborder="0" height="270" src="https://youtube.com/embed/10J9w7T2bOw" style="background-image: url(https://i.ytimg.com/vi/10J9w7T2bOw/hqdefault.jpg);" width="480"></iframe><div>Implementing the Microsoft Access database program.</div>Tom Beekhttp://www.blogger.com/profile/11214111493303257906noreply@blogger.com0tag:blogger.com,1999:blog-6307607831815769830.post-14368314781513734962020-01-08T04:19:00.007-08:002021-12-29T10:38:00.352-08:00Commenting Code<p><span style="font-family: arial; font-size: large;"> Putting `comments` in your code isn't just for code that you're going to share with other developers; it's a way for you to be able to understand what you wrote yesterday next week.</span></p><p><span style="font-family: arial; font-size: large;">There is no use coming up with a kick-ass algorithm if you don't remember how to use it. Make yourself a friendly note explaining why and how. It is a kindness to your future self.</span></p><p><span style="font-family: arial; font-size: large;">Don't be so clever that you write code that is useless to you later.</span></p>Tom Beekhttp://www.blogger.com/profile/11214111493303257906noreply@blogger.com0tag:blogger.com,1999:blog-6307607831815769830.post-72099949749242574472015-02-10T11:07:00.002-08:002015-02-10T11:20:43.561-08:00Google Quick Search Box for Windows<div>
<span style="color: #5a5353;"><span style="font-family: Verdana, sans-serif; letter-spacing: 1px; line-height: 23.3999996185303px;">To install:</span></span></div>
<ol style="-webkit-font-smoothing: antialiased; color: #5a5353; font-size: 18px; letter-spacing: 1px; line-height: 1.3; margin: 5px 0px 5px 30px; padding: 0px;">
<li style="-webkit-font-smoothing: antialiased; line-height: 1.3; margin: 5px 0px; padding: 0px;"><span style="font-family: Verdana, sans-serif;">Download it! (<a href="http://dl.google.com/quick_search_box/1.2.1151.245/googlequicksearchboxsetup.exe" style="-webkit-font-smoothing: antialiased; color: #701000; line-height: 1.3; margin: 0px; padding: 0px; text-decoration: none;">Click here</a>)</span></li>
<li style="-webkit-font-smoothing: antialiased; line-height: 1.3; margin: 5px 0px; padding: 0px;"><span style="font-family: Verdana, sans-serif;">Open up Command Prompt (Win+R and type 'cmd' and press Enter)</span></li>
<li style="-webkit-font-smoothing: antialiased; line-height: 1.3; margin: 5px 0px; padding: 0px;"><span style="font-family: Verdana, sans-serif;">Navigate in Command Prompt to where the file is saved, e.g., 'CD C:/Users/user/Downloads'</span></li>
<li style="-webkit-font-smoothing: antialiased; line-height: 1.3; margin: 5px 0px; padding: 0px;"><span style="font-family: Verdana, sans-serif;">Copy and paste: </span><span style="font-family: Verdana, sans-serif;">googlequicksearchboxsetup.exe /install /bundle=tbie /global /brand=GGLL /hl=en</span></li>
<li style="-webkit-font-smoothing: antialiased; line-height: 1.3; margin: 5px 0px; padding: 0px;"><span style="font-family: Verdana, sans-serif;">Press Return</span></li>
</ol>
<span style="font-family: Verdana, sans-serif;">Quick Search will be installed and you will then be able to configure it from the little button that appeared on your start menu.</span><br /><ol style="-webkit-font-smoothing: antialiased; color: #5a5353; font-size: 18px; letter-spacing: 1px; line-height: 1.3; margin: 5px 0px 5px 30px; padding: 0px;">
</ol>
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">To uninstall: </span><br />
<ol style="-webkit-font-smoothing: antialiased; color: #5a5353; font-size: 18px; letter-spacing: 1px; line-height: 1.3; margin: 5px 0px 5px 30px; padding: 0px;">
<li style="-webkit-font-smoothing: antialiased; line-height: 1.3; margin: 5px 0px; padding: 0px;"><span style="font-family: Verdana, sans-serif;">Open a command prompt</span></li>
<li style="-webkit-font-smoothing: antialiased; line-height: 1.3; margin: 5px 0px; padding: 0px;"><span style="font-family: Verdana, sans-serif;">Copy and paste:</span><span style="font-family: Verdana, sans-serif;">googlequicksearchboxsetup.exe /uninstall /bundle=tbie /global</span></li>
<li style="-webkit-font-smoothing: antialiased; line-height: 1.3; margin: 5px 0px; padding: 0px;"><span style="font-family: Verdana, sans-serif;">Press Return</span></li>
</ol>
<div style="-webkit-font-smoothing: antialiased; color: #5a5353; letter-spacing: 1px; line-height: 19.5px; margin: 0px; padding: 0px; text-align: left;">
<ol>
</ol>
</div>
<div style="-webkit-font-smoothing: antialiased; color: #5a5353; letter-spacing: 1px; line-height: 19.5px; margin: 0px; padding: 0px; text-align: left;">
=================================================<br />
Thanks to <span style="font-family: sans-serif; font-size: small; letter-spacing: 1px; line-height: 1.3; text-align: center; text-transform: uppercase;"><a href="http://jamesdoc.com/blog/how-to-install-google-quick-search-box-for-windows" style="font-family: sans-serif; letter-spacing: 1px; line-height: 1.3; text-align: center; text-transform: uppercase;" target="_blank">JAMES DOC</a> "</span><span style="color: #5a5353; font-family: sans-serif; letter-spacing: 1px; line-height: 30px; text-align: center;">Christian · Blogger · Web Developer · Geek"</span></div>
Tom Beekhttp://www.blogger.com/profile/11214111493303257906noreply@blogger.com0tag:blogger.com,1999:blog-6307607831815769830.post-72459373851501017602015-01-02T13:35:00.002-08:002015-01-02T13:45:30.084-08:00The SQL Distinct Key Word<div class="WordSection1">
<div class="MsoNormal">
<o:p><span style="font-family: Verdana, sans-serif;">This solution is for returning one record per user with either a min or max value in one of the record's fields.</span></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p><span style="font-family: Verdana, sans-serif;"><a href="http://stackoverflow.com/a/27748400/624918" target="_blank">stackoverflow has discussions/solutions for this topic</a> listed under:</span> </o:p><a class="post-tag js-gps-track" href="http://stackoverflow.com/questions/tagged/sql" rel="tag" style="background: rgb(224, 234, 241); border-bottom-color: rgb(179, 206, 225); border-bottom-style: solid; border-right-color: rgb(179, 206, 225); border-right-style: solid; border-width: 0px 1px 1px 0px; color: #4a6b82; cursor: pointer; display: inline-block; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 12px; line-height: 1.4; margin: 2px 2px 2px 0px; padding: 3px 4px; text-decoration: none; vertical-align: baseline; white-space: nowrap;" title="">sql</a><span style="background-color: white; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13px; line-height: 12.8000001907349px;"> </span><a class="post-tag js-gps-track" href="http://stackoverflow.com/questions/tagged/group-by" rel="tag" style="background: rgb(224, 234, 241); border-bottom-color: rgb(179, 206, 225); border-bottom-style: solid; border-right-color: rgb(179, 206, 225); border-right-style: solid; border-width: 0px 1px 1px 0px; color: #4a6b82; cursor: pointer; display: inline-block; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 12px; line-height: 1.4; margin: 2px 2px 2px 0px; padding: 3px 4px; text-decoration: none; vertical-align: baseline; white-space: nowrap;" title="">group-by</a><span style="background-color: white; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13px; line-height: 12.8000001907349px;"> </span><a class="post-tag js-gps-track" href="http://stackoverflow.com/questions/tagged/greatest-n-per-group" rel="tag" style="background: rgb(224, 234, 241); border-bottom-color: rgb(179, 206, 225); border-bottom-style: solid; border-right-color: rgb(179, 206, 225); border-right-style: solid; border-width: 0px 1px 1px 0px; color: #4a6b82; cursor: pointer; display: inline-block; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 12px; line-height: 1.4; margin: 2px 2px 2px 0px; padding: 3px 4px; text-decoration: none; vertical-align: baseline; white-space: nowrap;" title="">greatest-n-per-group</a><br />
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">---------------------------------------------------------------</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Verdana, sans-serif;">SELECT </span><span style="background-color: #fff2cc; font-family: Verdana, sans-serif;">DISTINCT ON</span><span style="font-family: Verdana, sans-serif;"> (P.ID) PR.PRACTICENAME AS "Practice",
P.FIRSTNAME AS "First Name", P.MIDDLENAME AS "Middle Name",
P.LASTNAME AS "Last Name", A.DATE::date AS "Last Appointment
Date"</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Verdana, sans-serif;">FROM PEOPLE AS P<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Verdana, sans-serif;">JOIN CLIENT C ON C.ID = P.CLIENT_ID<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Verdana, sans-serif;">JOIN PRACTICE PR ON PR.ID = P.PRACTICE_ID<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Verdana, sans-serif;">JOIN APPOINTMENT A ON A.CLIENT_ID = C.ID<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Verdana, sans-serif;">WHERE A.DATE IS NOT NULL<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Verdana, sans-serif;"><span style="background-color: #fff2cc;">ORDER BY</span> P.ID, A.DATE DESC</span><o:p></o:p></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">--------------------------------------------------------------- </span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Verdana, sans-serif;">The beauty of this query is that is returns only the record for each client's latest appointment <i>without</i> the use of complex sub-queries. Granted, the results may have to be further sorted, either using SQL or another tool, but it does return only one row per CLIENT and that row is for their LATEST appointment date.</span></div>
</div>
Tom Beekhttp://www.blogger.com/profile/11214111493303257906noreply@blogger.com0tag:blogger.com,1999:blog-6307607831815769830.post-44504490881133405632013-09-11T08:50:00.001-07:002013-09-11T09:47:25.258-07:00Douglas Crockford: The JavaScript Programming LanguageThis lecture is a complete overview of the <a class="zem_slink" href="http://en.wikipedia.org/wiki/JavaScript" rel="wikipedia" target="_blank" title="JavaScript">JavaScript</a> (<a class="zem_slink" href="http://www.ecma-international.org/publications/standards/Ecma-262.htm" rel="homepage" target="_blank" title="ECMAScript">ECMAScript</a>) language from a very knowledgeable and experienced leader in the field.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/v2ifWcnQs6M?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<br />
<div class="zemanta-pixie" style="height: 15px; margin-top: 10px;">
<a class="zemanta-pixie-a" href="http://www.zemanta.com/?px" title="Enhanced by Zemanta"><img alt="Enhanced by Zemanta" class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=f956f132-0b92-448d-8e67-fc997f086789" style="border: none; float: right;" /></a></div>
Tom Beekhttp://www.blogger.com/profile/11214111493303257906noreply@blogger.com0tag:blogger.com,1999:blog-6307607831815769830.post-57523433694553983182010-10-19T07:13:00.000-07:002012-06-14T13:05:41.735-07:00Excel Parsing Formulae<strong>Parse rightmost word in a cell:</strong><br />
=RIGHT(A1, LEN(A1)-FIND("*",SUBSTITUTE(A1," ", "*",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))
<br /><br />
<strong>Parse location:</strong><br>
=MID(A2,FIND("Location: ",A2,1)+14,FIND("(",A2,FIND("Location: ",A2,1))-FIND("Location:
",A2,1)-14)<br>
=MID(A2,FIND("Location: ",A2,1)+14,FIND("(",A2,FIND("Location: ",A2,1))-FIND("Location:
",A2,1)-14)<br>
[ Number of characters: FIND("(",A2,FIND("Location: ",A2,1))-FIND("Location: ",A2,1)-15 ]<br>
<br>
<strong>ParseName(fwd):</strong><br>
=PROPER(MID(A2,SEARCH("Name: ",A2,1)+6,SEARCH("Email:",A2,1)-(SEARCH("Name:",A2,1)+9)))<br>
=PROPER(MID(A2,SEARCH("Name: ",A2,1)+6,SEARCH("Phone:",A2,1)-(SEARCH("Name:",A2,1)+8)))<br>
<br>
<strong>ParseEmail:</strong><br>
=TRIM(LOWER(MID(A2,FIND("mailto:",A2,1)+7,(FIND("Home Location:
",A2,1))-(FIND("mailto:",A2,1)+9))))<br>
=TRIM(LOWER(MID(A2,FIND("Email: ",A2,1)+8,(FIND("Phone: ",A2,1))-(FIND("Email:
",A2,1)+12))))<br>
<br>
<strong>Concatenate middle and last names (& appellations):</strong><br>
=PROPER(TRIM(CONCATENATE(IF(LEN(C2)=1,C2&".",C2),IF(ISBLANK(D2),"","
"&D2),IF(ISBLANK(E2),""," "&E2),)))<br>
=PROPER(TRIM(CONCATENATE(IF(LEN(C2)=1,C2&".",C2),IF(ISBLANK(D2),"","
"&D2),IF(ISBLANK(E2),""," "&E2),IF(ISBLANK(F2),""," "&F2))))<br>
=PROPER(TRIM(CONCATENATE(IF(LEN(D2)=1,D2&".",D2),IF(ISBLANK(E2),"","
"&E2),IF(ISBLANK(F2),""," "&F2))))<br>
=PROPER(TRIM(CONCATENATE(IF(LEN(E2)=1,E2&".",E2),IF(ISBLANK(F2),"","
"&F2),IF(ISBLANK(G2),""," "&G2))))<br>
=PROPER(TRIM(CONCATENATE(IF(LEN(F2)=1,F2&".",F2),IF(ISBLANK(G2),"","
"&G2),IF(ISBLANK(H2),""," "&H2))))<br>
=PROPER(TRIM(CONCATENATE(IF(LEN(F2)=1,F2&".",F2),IF(ISBLANK(G2),"","
"&G2),IF(ISBLANK(H2),""," "&H2),IF(ISBLANK(I2),""," "&I2))))<br>
=PROPER(TRIM(CONCATENATE(IF(LEN(G2)=1,G2&".",G2),IF(ISBLANK(H2),"","
"&H2),IF(ISBLANK(I2),""," "&I2))))<br>
=PROPER(TRIM(CONCATENATE(IF(LEN(G2)=1,G2&".",G2),IF(ISBLANK(H2),"","
"&H2),IF(ISBLANK(I2),""," "&I2),IF(ISBLANK(J2),""," "&J2))))<br>
<br>
<strong>Parse location (in Body):</strong><br>
=MID(A2,FIND("Location: ",A2,1)+13,FIND("(",A2,FIND("Location: ",A2,1))-FIND("Location:
",A2,1)-14)<br>
<br>
<strong>Parse location (in Subject):</strong><br>
=IF(SEARCH(" in ",A2,1),RIGHT(A2,LEN(A2)-SEARCH(" in ",A2,1)-3),)<br>
=IF(SEARCH(" in ",C2,1),RIGHT(C2,LEN(C2)-SEARCH(" in ",C2,1)-3),)<br>
=IF(SEARCH(" in ",D2,1),RIGHT(D2,LEN(D2)-SEARCH(" in ",D2,1)-3),)<br>
=IF(SEARCH(" in ",C2,1),RIGHT(C2,LEN(C2)-SEARCH(" in ",C2,1)-3),IF(SEARCH(" for
",C2,1),RIGHT(C2,LEN(C2)-SEARCH(" for ",C2,1)-4),))<br>
=IF(SEARCH(" in ",D2,1),RIGHT(D2,LEN(D2)-SEARCH(" in ",D2,1)-3),IF(SEARCH(" for
",D2,1),RIGHT(D2,LEN(D2)-SEARCH(" for ",D2,1)-4),))<br>
-------------------------------------------------Tom Beekhttp://www.blogger.com/profile/11214111493303257906noreply@blogger.com0tag:blogger.com,1999:blog-6307607831815769830.post-88191915845219727342010-09-03T23:33:00.000-07:002010-09-03T23:33:19.694-07:00Buttons from images<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">You totally CAN make an image into a button that loads a new page without JavaScript.</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">The usual reason for wanting to make an image into a button without using the usual link tags, i.e., <a a="" around="" border="" button="" erstwhile="" get="" href="http://www.blogger.com/," is="" it.="" that="" will="" your="" yuck!=""></a></span><a a="" around="" border="" button="" erstwhile="" get="" href="http://www.blogger.com/," is="" it.="" that="" will="" your="" yuck!=""></a><br />
<a a="" around="" border="" button="" erstwhile="" get="" href="http://www.blogger.com/," is="" it.="" that="" will="" your="" yuck!=""><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Here's an alternative to having to define a JavaScript function for the onclick event:</span><br />
<br />
<span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> <input onclick="location.href='index.html'" type="button" value="click here" /></span></span><br />
<span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br />
</span></span><br />
<span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">- or -</span></span><br />
<span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br />
</span></span><br />
<span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> </span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"></span><div ="" id="clickhere"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: 'Courier New', Courier, monospace;">onClick="location.href='index.html'"></span></div><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"><br />
</span></span><br />
<span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Apply attributes using CSS:</span></span><br />
<span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;">#clickhere {</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"> background-image: url('pathtoimage/image.png');</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"> height: 20px;</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"> width: 75px;</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;">}</span></span></a>Tom Beekhttp://www.blogger.com/profile/11214111493303257906noreply@blogger.com0tag:blogger.com,1999:blog-6307607831815769830.post-35521546641579802202010-07-20T09:14:00.001-07:002010-07-20T09:14:12.947-07:00View Source Bookmarklet for iPhone<table cellspacing="0" cellpadding="0" width="100%" style="padding-bottom:20px;padding-top:10px;"> <tr> <td style="text-align:left;padding-bottom:20px;font-size:14px;line-height:1;font-family:Georgia, serif;border-bottom-width:2px;border-bottom-style:solid;border-bottom-color:#292929;"> var sourceWindow = window.open("about:blank"); var newDoc = sourceWindow.document; newDoc.open(); newDoc.write("<html><head><title>Source of " + document.location.href + "</title><meta name=\"viewport\" id=\"viewport\" content=\"initial-scale=1.0;" + "user-scalable=0; maximum-scale=0.6667; width=480\"/><script>function do_onload()" + "{setTimeout(function(){window.scrollTo(0,1);},100);}if(navigator.userAgent.indexOf" + "(\"iPhone\")!=-1)window.onload=do_onload;</script></head><body></body></html>"); </td> </tr> <tr> <td style="line-height:1;text-align:left;padding-bottom:0px;"> <h3 style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;color:#262626;font-weight:bold;font-size:11px;"><a href="http://www.evernote.com/" style="color:#3697b3;font-weight:bold;text-decoration:none;">From Evernote:</a></h3> </td> </tr> <tr> <td style="line-height:1.3;text-align:left;padding-top:0px;padding-bottom:7px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#b5b5b5;font-size:11px;"> <h1 style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-bottom:0;padding-right:0;padding-left:0;color:#262626;font-weight:bold;padding-top:5px;font-size:18px;">View Source Bookmarklet</h1> Clipped from: <a href="http://www.iphonewebdev.com/examples/" style="color:#3697b3;font-weight:bold;text-decoration:none;">http://www.iphonewebdev.com/examples/</a> </td> </tr> </table> <div class="ennote"><span style="border-collapse: separate; font-family: Verdana; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span style="font-family: 'Courier New', Courier, monospace; font-size: 21px; line-height: 35px; "><span style="font-weight: bold; "><font color="#15052D">var</font></span><font color="#15052D"> sourceWindow = window.open("about:blank");</font><span style="font-weight: bold; "><font color="#15052D">var</font></span><font color="#15052D"> newDoc = sourceWindow.document; newDoc.open(); newDoc.write("<html><head><title>Source of " +document.location.href + "</title><meta name=\"viewport\" id=\"viewport\" content=\"initial-scale=1.0;" + "user-scalable=0; maximum-scale=0.6667; width=480\"/><script>function do_onload()" +"{setTimeout(function(){window.scrollTo(0,1);},100);}if(navigator.userAgent.indexOf"+ "(\"iPhone\")!=-1)window.onload=do_onload;</script></head><body></body></html>"); </font></span></span></div> Tom Beekhttp://www.blogger.com/profile/11214111493303257906noreply@blogger.com0tag:blogger.com,1999:blog-6307607831815769830.post-72018235128931465372010-03-03T14:42:00.001-08:002010-03-03T14:42:58.941-08:00HTML and JavaScript for parsing E-mails and URLs<div class="gmail_quote"><div><div><font face="Verdana" size="2"><span>HTML part:</span></font></div> <div><font face="Courier New" size="2"><span><textarea name="Block2" rows="20" cols="50"></textarea><br /></span></font></div> <div><font face="Courier New" size="2">Enter a regular expression type:</font></div> <div><font face="Courier New" size="2"><select name="re" onchange="parseWith()"><br> <option value="^\W" selected="selected">Choose an expression</option><br> <option value="<strong><font color="#008000">[\w\.\-]+@[\w\.\-]+\b</font></strong>">E-mails</option><br> <option value="<font color="#008000"><strong>\w{3,6}:/+[\w.]*</strong></font>">URLs</option><br></select><br /></font></div> <div><font><font face="Courier New" size="2"><form name="outform"><textarea name='result' rows='20' cols='50'></textarea></form><br></font></font></div> <div><font face="Verdana" size="2"></font> </div> <div><span><font face="Verdana" size="2">JavaScript part:</font></span></div> <div><span><font face="Courier New" size="2">function parseWith(){<br> var txtI = document.text2.Block2.value;<br> var re = document.text2.re.value;<br> var use = new RegExp(re,"g"); // RegExp constructor compiles entered value to a JavaScript valid regex<br> var txtO = txtI.match(use);<br> document.outform.result.value = txtO;<br> replaceCommas();<br>}</font></span></div> <div><span><font size="2"><br><font face="Courier New">function replaceCommas(){<br> var txt = document.outform.result.value;<br> var re = /,/g;<br> var rTxt = txt.replace(re,"\n");<br> document.outform.result.value = rTxt;<br> var para = document.getElementById("label");<br> para.lastChild.nodeValue = "";<br> para.lastChild.nodeValue = "paragraph separated values";<br>}</font></font></span></div></div> </div><br> Tom Beekhttp://www.blogger.com/profile/11214111493303257906noreply@blogger.com0tag:blogger.com,1999:blog-6307607831815769830.post-57964175839956136722009-11-03T11:48:00.001-08:002009-11-03T11:50:32.495-08:00Most Useful Color Site on the Web<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://colorschemedesigner.com/"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 171px;" src="http://2.bp.blogspot.com/_xFGXS5QtFPs/SvCJNvORnFI/AAAAAAAAJ50/YkqA5F2sXiU/s400/colorschemedesigner.gif" alt="" id="BLOGGER_PHOTO_ID_5399966822324870226" border="0" /></a><span style="font-family: verdana;">Most useful and amazingly generous Website I have ever found for experimenting with color.<br />Thank you Peter Stanicek!<br /></span>Tom Beekhttp://www.blogger.com/profile/11214111493303257906noreply@blogger.com0tag:blogger.com,1999:blog-6307607831815769830.post-71089980496226530892009-08-19T10:39:00.000-07:002009-08-19T10:39:17.174-07:00Developing with Apache DerbyHaving problems getting your successfully compiled Java programs to run? If you are getting the annoying message that "main" was not found in the class, or "class file not found," the following will help you get your CLASSPATH variable sorted out.<br /><br />This is from Robert Brunner's IBM online tutorial article,<br /><a href="http://www.ibm.com/developerworks/opensource/library/os-ad-trifecta11/">Developing with Apache Derby -- Hitting the Trifecta: Java database development with Apache Derby, Part 3</a>:<br />If you encounter an error in either using the ij tool or compiling or executing any of the Java classes, the most likely culprit is the Java CLASSPATH environmental variable. Be sure this variable contains the requisite Apache Derby JAR files, which you can do by displaying the value of this variable using the echo $CLASSPATH command; the command should produce output similar to the following (note that your Apache Derby installation may change these values slightly):<br /><br />/opt/Apache/db-derby-10.2.1.6-bin/lib/derby.jar:/<br />/opt/Apache/db-derby-10.2.1.6-bin/lib/derbytools.jar:.<br /><br />(Notice that there is a period after the last colon above. This is not a end of sentence period; it needs to be there so that the current directory is included in the CLASSPATH.Tom Beekhttp://www.blogger.com/profile/11214111493303257906noreply@blogger.com0tag:blogger.com,1999:blog-6307607831815769830.post-43176974587645418422009-07-24T09:26:00.000-07:002009-07-24T09:26:56.058-07:00XHTML Basic encyclopedia topics | Reference.com<a href="http://www.reference.com/browse/wiki/XHTML_Basic"><cite>XHTML Basic encyclopedia topics | Reference.com</cite></a>: "<blockquote>the W3C comments that, 'The XHTML family is the next step in the evolution of the Internet. By migrating to XHTML today, content developers can enter the XML world with all of its attendant benefits, while still remaining confident in their content's backward and future compatibility.'</blockquote>"Tom Beekhttp://www.blogger.com/profile/11214111493303257906noreply@blogger.com0tag:blogger.com,1999:blog-6307607831815769830.post-57443094389815085022008-11-21T16:24:00.001-08:002008-11-21T16:24:56.697-08:00tombeek - FileMaker® Scripting<font size="4">Validating Email Addresses</font><br /><cite cite="http://tombeek.googlepages.com/filemaker%C2%AEscripting#top"><a href="http://tombeek.googlepages.com/filemaker%C2%AEscripting#top">tombeek - FileMaker® Scripting</a></cite>Tom Beekhttp://www.blogger.com/profile/11214111493303257906noreply@blogger.com0