CF11 issue
I’m trying to find an efficient way of pulling in a website’s metadata keywords (from the <meta> tag). Server’s running CF11
( Read the rest of this entry » )
Originally published at The Scotto Grotto (org). You can comment here or there.
I’m trying to find an efficient way of pulling in a website’s metadata keywords (from the <meta> tag). Server’s running CF11
( Read the rest of this entry » )
Originally published at The Scotto Grotto (org). You can comment here or there.

or… what my settlement in fallout 4 usually ends up looking like.
Originally published at The Scotto Grotto (org). You can comment here or there.
i\hbar\frac{\partial}{\partial t}\left|\Psi(t)\right>=H\left|\Psi(t)\right>
latex \LaTeX&bg=ffcccc&fg=cc00ff&s=4
Originally published at The Scotto Grotto (org). You can comment here or there.
https://code.visualstudio.com/updates/v0_3_0 (Visual Studio is now open source – https://news.ycombinator.com/item?id=10588264)
smortaz 40 minutes ago
We’ve been asked this by a few people, so I figured this is a good place to respond:
Will PTVS (Python Tools for Visual Studio) come to VSCode?
The answer is YES! This will be a major focus next year. Expect full intellisense, debugging, profiling, pkg mgmt, unit test, virtual env, multiple interpreter, Jupyter, etc. support.
Disc: Python/R/Jupyter team lead
https://www.visualstudio.com/features/python-vs
Originally published at The Scotto Grotto. You can comment here or there.
Originally published at The Scotto Grotto. You can comment here or there.
https://en.wikipedia.org/wiki/You_aren’t_gonna_need_it
“You aren’t gonna need it“ (acronym: YAGNI) is a principle of extreme programming (XP) that states a programmer should not add functionality until deemed necessary. XP co-founder Ron Jeffries has written: “Always implement things when you actually need them, never when you just foresee that you need them.”[ Other forms of the phrase include “You aren’t going to need it” and “You ain’t gonna need it”.
Originally published at The Scotto Grotto. You can comment here or there.
The final working code
<cfloop list="#FORM.fieldnames#" index="c" delimiters=",">
<cfif listfindnocase("ORDER",listfirst(c,"_"),",")>
<cfset item = "##" & "FORM." & c & "##">
<cfquery name="reorder" datasource="guidance">
UPDATE fed_lands_doctype
SET type_order = <cfqueryparam value="#evaluate(item)#" cfsqltype="cf_sql_numeric">
WHERE type_id = #listlast(c,"_")#
</cfquery>
</cfif>
</cfloop>
Originally published at The Scotto Grotto. You can comment here or there.
Let’s see here, dear journal…
Friday, Paul sussed out a great solution to the site’s issues – It’s loading now, and fast! After a week of data drag and timeouts he went with 2 things.
1) I changed how caching was done on her pages2) I indexed 7 columns in her databaseonce that bottleneck was gone, all the Access-driven pages flewit works so well I applied that caching model to our pages.
On Test where there’s no caching, the combined total query execution time was around 230-250ms. Throwing a 30 second cache on the 2 main queries that the others draw from dropped that to 5-11ms.
Upgrade to CF10 seems to be solidly in place now.
http://www.adobepress.com/articles/article.asp?p=2044525
http://www.carehart.org/blog/client/index.cfm/2012/3/7/charlie_areharts_ultimate_cf10_new_features_list
We should probably also find a list for CF9, because we picked those up during the upgrade from 8 too.
Friday night wasn’t much fun for me – long commute home, sitting next to a guy that was drunk. Apparently he does construction of some sort in DC. I relocated as soon as I could, but the first 45 minutes of the ride home was like being next to a smelly and loud goat.
Got home in a time to get back in the car and head south for another 45 minutes to Laughing Buddha for dinner with the in-laws. The food there is usually very good, but they must’ve been having a rough night… this was the first time I didn’t want to finish my meal, or keep the leftovers. That said, they are awesome 99% of the time. I’ll let them know later on – I’m confident that they can take constructive criticism.
Returned home, and promptly zonked right out.
Saturday was Pi / Pie / Pye day, of course.
Spent most of the day taking it easy – I drifted in and out of sleep pretty much until we left for dinner.. . recovering lost sleep after an exhausting week, I suppose.
We celebrated by going for pizza at 3 brothers (after much deliberation – prior to that, it was going to be a trip to Annapolis for Cheeburger Cheeburger, then Maggiano’s, then the Double T Diner for Pie… ) I was perfectly happy with our Sicilian Pizza solution – I was fairly surprised that it is no longer on the menu, but they can do one if asked.
Post- Pizza, Chris and Allison bounced to TJ Maxx while Larry and I hit Safeway for some essentials. Made it back home about 10 or so, and we stayed up for maybe an hour watching YouTube before hitting the sack.
Sunday we went to Brunch with the Meyers – met their daughter (Paige) their niece (Kelly), and friends Jeff and Lucie (and their two adorable kids, names out of my noggin) . Jeff and I hit it off pretty well, a common love of comics / RPG tabletop and classic video games. He may have convinced me to give Arrow another try. Seasons 1-3 are on Netflix right now… if the bus has WiFi, I may make the attempt on the commute home during the week(s) ahead.
So, I finally got to eat at the Rod & Reel (Rotten Eel). The food was OK… standard buffet stuff. decent waffles, decent omelets. They weren’t very interested in high-speed busing the tables. There was a huge crush of people which meant lines and navigation issues. Our reservation was for 11:15, but we really didn’t get a spot to sit in until nearly noon. Not my thing – plenty of other breakfast spots to visit.
Returned home and we zonked out again. After napping for a while, Allison and I just hit the house hard and caught up with a bunch of chores that just needed doing, and had been put off too long. We ended up having leftover pizza for dinner, and sacking out after that.
My mood over the course of the weekend has been rather hyper-sensitive. Got a bit of a case of the hives, back was achy at the least and very painful at the worst. I was not a happy camper – irritable, cranky, and a bit negative in thought.
Originally published at The Scotto Grotto. You can comment here or there.
Removes duplicate values (if they exist) in a list.
List sans duplicate values
ColdFusion 10: Added this function
ListRemoveDuplicates(list[, delimiter] [, ignoreCase])
| Parameter | Description |
|---|---|
list |
Required. List of objects. |
delimiter |
Optional. Character(s) that separate list elements. The default value is comma. . |
ignoreCase |
Optional. If true, ignores the case of strings in the list. By default the value is set to false. |
<cfscript> myList = "one,two,three,four,five,one,five,three" newList = listremoveduplicates(myList); //default delimeter is "," //newList contains "one,two,three,four,five" </cfscript> |
<cfscript> myList = "one,two,three,four,five,ONE,TWO,THREE" newList = listremoveduplicates(myList, ",", true); //newList contains "one,two,three,four,five" </cfscript> |
Originally published at The Scotto Grotto. You can comment here or there.
http://www.gpickin.com/cfrepo/
COLDFUSION INSTALL REPO – Updated 1/22/15
This repo has been created to help those easily find the ColdFusion installs and to help alleviate all the copies sitting around on hard drives everywhere.
Created initially Feb 12, 2014, we are trying to add more files all the time.
If you have installers, hot fixes or updaters not here, please let us know, and we’ll try and add them to the repo.
Originally published at The Scotto Grotto. You can comment here or there.
string manipulation -
left(event_desc,iif(find(".",event_desc,100) eq 0,500,find(".",event_desc,100)
return the following string from event description -
if the leftmost 100 characters of the text contains a period and is the only period within the first 500 characters, give the text up to the period, otherwise, return the text up to the second period.
Nicely done – saves having to run a loop or step function.
Originally published at The Scotto Grotto. You can comment here or there.
cf reference of the day. http://help.adobe.com/livedocs/coldfusion/8/htmldocs/help.html?content=Expressions_7.html
Originally published at The Scotto Grotto. You can comment here or there.
SQL QUICK REFERENCE
ColdFusion Query Syntax
--------------------------------------
( Read the rest of this entry )
Originally published at The Scotto Grotto. You can comment here or there.
Section 508 1194.22(d): “Element specifies background color but not specify foreground (text) color”
If I use background-color: [whatever color];
the parameter color: [whatever legible 508 compliant legibility color, or at least inherit]; will be contained with it.
Section 508 1194.22(d): “Element specifies background color but not specify foreground (text) color”
If the author specifies a foreground text color then they should also specify a background color which has sufficient contrast with the foreground and vice versa.
User needs to review all cascading style sheet values for the page. Make sure that all background color values “bgcolor” have a corresponding text color value “color.” This is required to allow visually impaired users to control foreground and background colors through personal stylesheets or other means.
If the site is failing this checkpoint, it is usually due to table, divs, among other tags where either the attribute color or the attribute background-color have not been specified, alongside one another.
For example, you could have something specified
<div style="color: blue;"></div>
which would fail because there is no background color specified.
<div style="color: blue; background-color: white;"></div>
Would fly.
Originally published at The Scotto Grotto. You can comment here or there.
“Except for Table IDs, Avoid Numeric Fields Where Possible”
seriously?
<cfquery name="getItem" datasource="context"> select * from Item where ItemID = <cfoutput>#form.editme#</cfoutput> </cfquery>
There are really three major reasons:
But it’s not all bad for SELECT *. I use it liberally for these use cases:
SELECT COUNT(*) FROM table;
in this case, * means “count the rows”. If you were to use a column name instead of * , it would count the rows where that column’s value was not null. COUNT(*), to me, really drives home the concept that you’re counting rows, and you avoid strange edge-cases caused by NULLs being eliminated from your aggregates.
Same goes with this type of query:
SELECT a.ID FROM TableA a
WHERE EXISTS (
SELECT *
FROM TableB b
WHERE b.ID = a.B_ID);
in any database worth its salt, * just means “a row”. It doesn’t matter what you put in the subquery. Some people use b’s ID in the SELECT list, or they’ll use the number 1, but IMO those conventions are pretty much nonsensical. What you mean is “count the row”, and that’s what * signifies. Most query optimizers out there are smart enough to know this.
Originally published at The Scotto Grotto. You can comment here or there.
Save in your .vim/indent directory. It should kick in when cfutils’ ftdetect plugin determines that your cfc is cfscript only, which is when it sees a line beginning with “component” or a multiline script comment.
Originally published at The Scotto Grotto. You can comment here or there.
Remove div from table cell
\<th class=\”row\” scope=\”row\”\>\<div align=\”center\”\>(.+?)\<\/div\>\<\/th\>
<th class=”row” scope=”row”>$1</th>
Replace contents of H1
\<h1\>(.+?)\<\/h1\>
<h1>new text</h1>
Find H1 with break
<h1>[^]*</h1>
Replace H1 with H2
\<h1\>(.+?)\<\/h1\>
<h2>$1</h2>
\<th colspan=”3″ id=”(.+?)” headers=”(.+?)”>\<div align=\”left\”\>\<strong\>(.+?)\<\/strong\>\<\/div\>\<\/th\>
<th colspan=”3″ id=”$1″ headers=”$2″ align=”left”>$3</th>
\<td (.+?)>\<h4 align=\”center\”\>(.+?)\<\/h4\>\<\/td\>
<td $1 align=”center”>$2</td>
Finds tables
<table [^>]*>[^]*</table>
Copy name to ID
<input name=”(.+?)”
<input name=”$1″ id=”$1″
<tr(.+?)>
<td>(.+?)</td>
<tr$1>
<th scope=”row” class=”row”>$2</th>
<!DOCTYPE [^>]*>
[^]*
<div class=”content”><a name=”content”></a>
([^]*)
<p align=”center” class=”small”>[^]*
#(.+?)\.(.+?)#
Remove td/tr/th width
<t(.+?) width=\”(.+?)\”>
<t$1>
Notepad++
<a href=”(.*)”>(.*)</a>
Empty A tags:
<a name=”([^"]*)” id=”([^"]*)”></a>
Move anchor text outside tag
<a name=”(.+?)” id=”(.+?)”>(.+?)</a>
<a name=”$1″ id=”$2″></a>$3
Originally published at The Scotto Grotto. You can comment here or there.