This will alert all functions associated to a given element…
var elem = document.getElementById('ELEMENT_ID_HERE');
var str = '';
for(var prop in elem) {
if(typeof elem[prop] == 'function')
str += prop + '\n';
}
alert(str);
This will alert all functions associated to a given element…
var elem = document.getElementById('ELEMENT_ID_HERE');
var str = '';
for(var prop in elem) {
if(typeof elem[prop] == 'function')
str += prop + '\n';
}
alert(str);
A gemn of a function found of the wordpress codex, very useful is
get_the_title(ID)
find it here: http://codex.wordpress.org/Function_Reference/get_the_title
I am often cutting and pasting this in wordpress plugins
$query = “SELECT id, post_title FROM ” . $wpdb->prefix . “posts WHERE post_type = ‘wpf_venue’ AND post_status=’publish'”;
$venues = $wpdb->get_results ( $query, ARRAY_A );
So may times you want to look up information on cities or suburbs, here’s the resource
http://www.geonames.org
You download and use or query via a web service
As the saga continue manipulating data this comes in handy to increment all the id’s in a table
UPDATE jos_content_old SET id = id + 50 WHERE (id = id)
Keep in mind the resulting id being set must be higher thatn any existing ones or ther will be an error.
This often comes up a whole lot of same sized blocks on a webpage with an image inside. gettting the image to center in the middle is easy but what happens when it needs to sit in the vertical middle as well?
CSS:
div.myblock{
display: table-cell;
height:120px;
width: 120px;
border: 1px solid #000;
vertical-align: middle;
text-align:center;
}
So everyone likes cheap Software, and there are real places to get Cheap software online but there are also scams to get cheap online software.
I was presented with this site http://royal-customers.net and immediately the unreal cheap online prices raised alarm bells. SO thanks to a google search I found a some online discussion. http://forums.anandtech.com/showthread.php?t=2050621
This scam is presented regularly and rebadged on the internet!
So what to take from this …
“There are four market segments: Commercial; OEM; Academic; and Home.
Commercial = “Retail-box.” Buyers pay top-dollar. In return, there is more substantial customer service, and buyers are eligible to upgrade one software version for another by purchasing the “ Upgrade retail-box ” of the newer version instead of the standalone retail-box for the newer version. Availability: Any resellers of software and the publishers themselves.
OEM= Software bundled with “a new computer” by OEM PC manufacturers. No glossy packaging; no printed manual – just a disc or set of discs in white envelopes. Customer-support limited to updates and fixes to current version available on-line; customer-support limited to e-mail answers to questions or “customer-incidents” posted at the web-site – in some cases. Price may be roughly ½ to 2/3 of Retail-box. If an earlier version, then lower than that. Availability: At one time, required purchase of hardware for reseller to meet obligations to publisher. Always distributed as no-frills CD/DVD in white envelope, or more elaborately labeled disc-box from the publisher that is labeled “OEM.” Usually, the stock becomes available some months after the software version initial release, as surplus stock moves from OEM’s to resellers.
Academic= Most purchases require verification of current status as student/teacher at a qualifying institution. Exceptions occur when a reseller buys surplus from institutions – versus inventory purchased in contract with the software publisher. Price likely to be half retail-box. Packaging: better than OEM. Boxes may be labeled “Not for Commercial Use.” Support limited to current version – no upgrade benefit. Availability: Many resellers — some specializing in academic sales — others serving the general software market.
“Home and Student” – similar to academic, but no verification requirement in many instances, even for stock purchased from the software publisher. Boxes may be labeled “Not for Commercial Use.” Support limited to current version – no upgrade benefit. Price similar to Academic. Availability: Boxes may find their way to outlets like COSTCO, Amazon, etc.
In all cases, the software, features, patches, fixes, digital manual, help screens and service-packs are identical. For the “Retail-box”, the software can be obtained through download directly from the publisher or a publisher-approved reseller – who may then mail any manuals (retail-box) or CDs for a nominal $10 addition to charges. But it is unlikely that OEM, Academic or Home versions will be made available for online download.
So any reseller who offers downloads of “OEM” versions is likely to be illegitimate. In all cases, they will be illegitimate if the company’s policy states that “owing to the nature of the software, you cannot register it online,” because all legitimate software can be registered online – whether retail-box, OEM, Academic or Home-and-Student.
Occasionally, you might find a legitimate reseller using a retail box version as a loss-leader – and at a considerable discount. For instance, CorelDraw X4 retail-box at Purplus may be $400; the same product number and retail box at The Nerds.net may be offered for $90+. [It’s a real retail-box; it’s legitimate. It may reflect the pricing some resellers receive before mark-up.]”
Thanks BonzaiDuck, whoever you are.
Dreamweaver’s check in and check out functionality can be quite useful when working with more than one person on a site but it creates heaps of .LCK files.
If you want to remove them from the command line go to the top level directory and type this:
find . -type f -name “*.LCK” -exec rm -f {} \;
ahahahaha – sk****w you Dreamweaver and your resource hogging slow cursor movingness!
After a bit of digging around inside wp-ecommerce the category images were loading like a 300 k progressive jpg on a 5.6k modem – not cool.
So after a forum search on getshopped.org this plugin was recommened
http://wordpress.org/extend/plugins/w3-total-cache/
So after searching around the web looking for code to get data from one table intop another I found this example posted on the mysl dev forum
mysql> INSERT INTO orders (customer_cust_id, orderdatetime, message, taxrate, shippingprice)
-> SELECT ‘1’, NOW(), null, taxrate, shippingprice FROM customer
-> WHERE cust_id=’1′;
Query OK, 1 row affected (0.01 sec)
Records: 1 Duplicates: 0 Warnings: 0
So basicly use INSERT INTO ‘tablename’ SELECT * FROM ‘tablethatmatches’