print to pdf
Dec0
print to pdf
download this app to add a pdf print driver. Then you can print anything as a pdf
http://www.dopdf.com/
cron job every even or odd minute
Nov0
if you need one script to go off every even minute and then anthor ever odd set your cron jobs to go off as below, good for testing tcp / udp listeners
every even minute 0-59/2 * * * *
every odd minute 1-59/2 * * * *
Mysql delete all rows and reset autoincrement
Oct0
delete all the rows of a mysql talble
delete from tablename
reset the auto increment key
ALTER TABLE tablename AUTO_INCREMENT=0
Merging Two Tables in Mysql
Oct0
Ok, I had two mailing lists I needed to add together (minus duplicates of coarse)
first make sure both talbes have the same fields (one had “last_name” and “first_name” fields while the other had just “name”)
UPDATE coo_mailing_list SET name = CONCAT(first_name, ‘ ‘, last_name);
bam!!! coo_mailing_list has a name field with first and last names in it.
Next merge the two tables into a new table
CREATE TABLE new_mailing_list SELECT DISTINCT * FROM (SELECT name, email FROM mailing_list UNION ALL SELECT name,email FROM coo_mailing_list) sq;
add a primary key field and set to auto increment and rename the old and mailing lists tables and your
your done!
Animated Page Scrolling with Jquery
Jul0
Animated Scrolling with Javascript Example
Contruct anchor tages as usuall
download jquery.js
download scrollto.js -> I got the originall at leaneringjquery.com but it was packed, i unpacked it and made the following changes on lines 681
//jQuery.dequeue(z.e, ‘interfaceFX’)
jQuery(e).dequeue(’interfaceFX’);
put the two .js files in a folder named /java/ on your web root
add these lines in your header
<script src=”/java/jquery.js” type=”text/javascript”></script>
<script src=”/java/scrollto.js” type=”text/javascript”></script>
markup anchors like this (example)
<a href=”#background”>Background</a><br />
<p>
<strong><a name=”background” id=”background” class=”anchor”>Background</a></strong>
Since 2000 healthcare organizations have been adapting concepts and practices borrowed from the Toyota Production System (TPS/Lean) to improve the delivery of care and reduce costs. A variety of approaches have been implemented, some more successful than others and some in specific areas of the organization, but few with a comprehensive plan that would optimize all areas of healthcare operations. This proposal strongly suggests that the witnessed successes of some can be realized across the industry if executed with a comprehensive plan and shared openly. The plan outlined in the Program proposed herein would provide structure for the participating organizations and demonstration of the plan and results to limitless numbers of observers/adopters.
</p>
Remove Blank Lines from file with dreamweaver
Jul0
1) select an entire blank line (click on the line number)
2) with the blank line selected do a find and replace (ctrl f)
3) replace the blank line with some unique character string (i.e. —–) string shouldn’t occur any were else in the file
4) replace all no this will get rid of all line breaks, but they will now be replaced by —–
5) open a file that contains a blank line, select it and copy it (ctrl c)
6) go back to your original file
7) select —–
find and replace (ctrl f)
9) paste the blank line in the replace with field
10) replace all
mysql delete rows with duplicate data
Jul0
DELETE
FROM table1
USING table1, table1 AS vtable
WHERE vtable.id > table1.id
AND table1.field_name = vtable.field_name
add .html file extension to php code coloring and hints for dreamweaver
Jul0
so you have apache set up to parse .html files as if they were php ( see http://answers.ironlasso.com/?p=6) Now you want dreamweaver to code color them like it does .php files. Here’s what you do
to add .html extension to php code coloring and hints
-open MMDocumentTypes.xml somewere under program C:\Program Files\Macromedia\Dreamweaver 8\Configuration\DocumentTypes
search xml file for .php
-add .html extension to php
-remove it from html
apache mime types
Jul0
Ever wonder what server side language a site uses? Normally you can tell by there file extensions .php .asp .cfm. But about sites who have extensions like .go or have .html pages that you can tell have alot more that just html going on behind the seens.
well you can make apache parse any extension as if it were php with what is called a mime type. For example
to enable .html to run like php add
AddTpye application\x-httpd-php .html
to your httpd.conf file then restart apache and caboom ever .html page on your site is php ready. Whats the point? Well for the most part its confuse the opposition (hackers, competitors, etc..). However that being said anyone with a little internet know how can figure out the servers side language(s) being used on a page, but i’ll leave that for a different post