zzapper’s Technical Tips
| Vim Tips and Tricks | Famous Vim Tips |
| Vim Tips Blog | Vim Tips in Detail |
| mysqltips.co.uk | The most popular database |
| zsh tips | An Alternative to bash |
| Cygwin tips | Linux on your Windows PC |
| Best Productivity Programs | Open Source |
| Vim Tips and Tricks | Famous Vim Tips |
| Vim Tips Blog | Vim Tips in Detail |
| mysqltips.co.uk | The most popular database |
| zsh tips | An Alternative to bash |
| Cygwin tips | Linux on your Windows PC |
| Best Productivity Programs | Open Source |
Your Service Pack fails to install error given 80246007 or may be 80070003.
See here for official Microsoft solution (but see my additional information in red) :-
To change or restart the Background Intelligent Transfer Service (BITS)
You must be logged on as an administrator to perform these steps.
Open Administrative Tools by clicking the Start button , clicking Control Panel, clicking System and Maintenance, and then clicking Administrative Tools.
RIGHT MOUSE CLICK Services and SELECT RUN AS ADMINISTRATOR.
If you are prompted for an administrator password or confirmation, type the password or provide confirmation.
Right-click the Background Intelligent Transfer Service (BITS) service, and then click Properties.
On the General tab, next to Startup type, make sure that Automatic (Delayed Start) is selected. If it is not, select it and then click Apply.
Next to Service status, check to see if the service is started. If it is not, click Start.
Service Pack 1 will now install.
This has happened to me several times and I’ve always blamed a WordPress update or Theme update so I’ve de-installed and re-installed etc etc, but in the end it has always been the same simple mistake namely An Unclosed DIV Tag in a Post! This usually or always causes chaos to your page structure. So next time this happens to you whether on your WordPress Blog or in the CSS of your Website always think to check for unmatched DIV Pairs <DIV>…</DIV>
find /var/www/html/ -regex “.*\(php\|js\|inc\)” -exec grep -i ‘tbl_title’ {} +
find /var/www/html/ -regex “.*\(php\|js\|inc\)” -exec grep -i ‘tbl_title’ {} \;
NB: the \; and + endings are different the + ending usefully displays the matching file name
Of course if you have a recent bash you will likely prefer:-
grep -ilR –include=*.{php,inc,js} ‘fn_main’ c:/inetpub/wwwroot
or
grep -iR –include=*.{php,inc,js} ‘fn_main’ c:/inetpub/wwwroot
I wanted to quickly compare two versions of a Word document and realized I didn’t know how to do it. A quick Google revealed that catdoc was available with Cygwin (and I guess elsewhere) .
Alternatively use antiword
place the following 4 lines in your .vimrc file
” use antiword to allow VIM to view the text of a Word Document
autocmd BufReadPre *.doc set ro
autocmd BufReadPre *.doc set hlsearch!
autocmd BufReadPost *.doc %!antiword “%”
> vim -d report1a.doc report1b.doc
Remember neither catdoc or antiword allow you to update your word documents.
catdoc also works with PowerPoint etc.
Just found out that these don’t work with the XML based docs eg report.docx for these you need Perl based docx2txt
Software seems to need constant updating these days here’s what I’m updating:-
I was also bedeviled by those warning screens “Are you sure you want to continue” which disappeared behind other windows and left me wondering why an update was taking so long!.
I always say yes to updates if only to get rid of them, but gosh I would actually like to use my Netbook, Blackberry etc!!
What is currently in demand is PHP5 that means OOP, any framework eg CakePHP/Zend or CodeIgniter and Jquery (Javascript) or good enough or on its own the serious Drupal experience.
If you’ve got these you are gold dust, if not you are … dust …
any comments?
I’ve recently become aware of how behind the times my skills are , in particular if you write PHP you are expected to use a framework . I’ve chosen CakePHP and have installed it on my local Apache Server with a few permission hiccups. I’ve then completed the create a blog tutorial and it’s stunning how easy it is. It uses the MVC or Model-View-Controller system for development. To quote their documentation it CakePHP takes the monotony out of web development. We provide you with all the tools you need to get started coding what you really need to get done: the logic specific to your application. Instead of reinventing the wheel every time you sit down to a new project, check out a copy of CakePHP and get started with the real guts of your application.
Edit include/themes.inc.php
Find the function and modify as follows
function theme_page_title($section)
{
global $CONFIG;
$return = strip_tags(bb_decode($section)) . ' - ' . $CONFIG['gallery_name']; // original code
$return = $CONFIG['gallery_name']; // Section removed
return $return;
}
this change works for cpg1.5.x
All I use Vim 99% of the time whenever I want to do a really complex multiple edit I tend to use Perl.
So what’s the script doing ? It reads in one text file line by line and then operates on certain lines , and then writes out each line to an output file. You are only limited by your imagination as to what you do in the loop.
With a Perl script you can use Perl variables for counts, you can use a hash to store all the text and loop through it as often as required.
#!/usr/local/bin/perl
# pedit.pl
# description : Use for complex edits on a single file, adapt as required
# this trivial example is just incrementing a count
# zzapper
# v1.0
if ($#ARGV >= 0) { $file = $ARGV[0]; }
else
{
print "enter file:"; $file=
}
chomp $file;
open (R,"$file") or die ("could not open $file ($!)");
$out = "c:/aaa/out.txt";
$out = "$file.txt";
$cnt=100;
open (W,">$out") or die ("could not open $out ($!)",__LINE__);
{
for $l (
{
$l=~s/david1/david$cnt/gi; # do what you want here
print W $l;
$cnt++;
}
}
close W; close R;
print "\nOutput in cnt: $cnt :: $out\n";
As a freelancer I only need a simple bookkeeping package so QuickBooks Simple Start Free Edition is perfect.
Quickbooks is very quick to set up and I soon had my invoices entered and now wanted to email them but oops there is no way to save the invoice as a PDF. Never mind I can email them to my client but no QuickBooks Simple Start only recognizes either Outlook or Windows Mail as email client and these are not available on Windows 7. I download, install and configure their replacement Windows Live Mail but QuickBooks stubbornly refuses to acknowledge it. I now trawl through QuickBooks own community forum and see people moaning that Windows Live Mail is ignored; apparently it will be or is available in QuickBooks 2011 .
Finally breakthrough I install CutePDF Writer http://www.cutepdf.com/ it is completely free. Now all I have to do is print my Invoice and select CutePDF as the virtual printer, CutePDF asks me where I want to save the Invoice PDF. I can then manually email my invoices (PDFs) to customers using my conventional email client allowing to add a personal message and also with the advantage of leaving me with an audit trail.
CutePDF Instructions: Using CutePDF Writer to create PDF document:
Select Print to bring up Print dialog box.
Then select CutePDF Writer as the Printer to print.
You will get a Save As dialog box prompted for saving created PDF file.
Select a folder to Save in and enter a File name, then click on Save.
Go to that folder to find your PDF file.
CutePDF Writer supports Microsoft Windows 98/ME/2000/XP/Vista/7 (x32/x64).