Posts tagged Tips
Add SyntaxHighlight to Windows Live Writer in Preview mode
Feb 7th
Windows Live Writer (shorter: WLW) is one of the most popular blog authoring tool that I also happen to like and use. And I say this because of its features – I especially enjoy the Preview tab. But what it really lacks is previewing the ENTIRE page – it will get only the html and some css. So no Syntax Highlighting of my code? Let me tell you how I solved this issue.
As a blog writer I searched for something that could allow me to write the articles offline and then upload them in Wordpress. I also tried Wordpress built-in editor, but the editing box is so small that I couldn’t use it too much.
The most important feature for me is that it retrieves the blog theme and has a preview function that provide you the same look on editor window. So you will be able to write a post with a preview. But when having a more complex theme, using JQuery or Prototype, you will discover that you don’t get any more the same look and feel as in the blog. This is partially ok for editing, but sometimes it is really bad – especially if you’re a programmer and add a lot of code in your page. On blogs there is a solution to show the code with syntax color, but in the Windows Live Writer I couldn’t find one suitable plug-in that does this.
How to add a Webslice
Sep 15th
It is very nice and user-friendly to have Webslices on your website. It improves the user experience by allowing visitors to be up to date with the latest content that you provide, assuming that it is fitted to this presentation style. Since my BNR exchange rates page was this kind, I pursued in adding a Webslice especially for it.
Adding a webslice to your website is simple. After you read the main specifications or my previous article, you’ll understand the concept behind: first you signal to the browser that you have a special part of your website by setting to a container element the class “hslice”:
<div id="BNRExchange" class="hslice">
<div style="display: none" class="entry-title">
<img id="image" alt="Radu Poenaru's weblog gives you BNR Exchange rates" src="http://www.radupoenaru.com/bnr/images/radupoenaru.jpg" width="128" height="128" />
<p>
Cursul oficial BNR
</p>
</div>
<p>
<a style="display: none" href="http://www.radupoenaru.com/bnr/bnr.php" rel="entry-content">
<a style="display: none" href="http://www.radupoenaru.com/bnr/bnr.php" rel="Bookmark" target="_blank">
<span style="display: none" class="ttl">5</span>
</p>
<div id="updateTrigger" class="entry-content" runat="server" />
........ your content that you want surrounded by the green webslice part ..............
</div>
SyntaxHighlighter – how to use it and brushes available
Sep 4th
![]()
The brushes used by SyntaxHighlighter are in separate syntax files named brushes. The following can be used to format the <pre class=”brush: brushname”> that you want to use.
Brushes () in alphabetical order:
| Brush name | Brush aliases | File name |
|---|---|---|
| ActionScript3 | as3, actionscript3 | shBrushAS3.js |
| Bash/shell | bash, shell | shBrushBash.js |
| C# | c-sharp, csharp | shBrushCSharp.js |
| C++ | cpp, c | shBrushCpp.js |
| CSS | css | shBrushCss.js |
Wordpress- how to implement Syntax Highlighting
Sep 3rd
Windows Vista Updates Download
Nov 12th
In Windows Vista you are constrained to use the default tool,Windows Updates, which is set to download only the files which need to be updated, by example if xxx.dll exists in Microsoft’s database as a bigger version and needs to be updated, then only this file will be downloaded from the Microsoft servers.
What if you need to reinstall your computer and you don’t have Internet connection available? Sometimes when you don’t know where your work will ask you to be, is better to have all updates archived safely and closely to you, on your harddrive. Read the rest of this entry »
Customize your Gmail web interface
Nov 7th
Google has been the most improving mailing web interface that I know. Having a whooping 2 GB storage space when launched, he slapped over the face all his competitors, whom at that time had 4- 5 MB of storage space. Now is 7.5 GB and increasing.
The interface is very clean and intuitive, but not lacking the good looking ( example of bad looking is Squirrel Mail who looks obsolete, due to the right angle corners, opposed to the round corners approach in Gmail). Also the code completion for emails, the spell checker and other goodies makes this interface the most interesting in my opinion.
Recently, I learn about something that is quite hidden in Gmail interface: the plugins.
These can be activated by going into Settings in your Gmail mail account, click on Labs tab and search the desired plugin. In order to add it’s functions on the interface, you must activate first by checking the Enable option. It will be applied as soon as you click ‘Save Changes’ button on the bottom of the page.
|
I have activated the following plugins:
Give it a try! |
svn: Your file or directory is probably out-of-date
Sep 15th
One of the most tedious bugs in Subversion, ever, is this one. If you want to commit changes to your working copy, and the response of svn is :
svn: The version resource does not correspond to the resource within the transaction. Either the requested version resource is out of date (needs to be updated), or the requested version resource is newer than the transaction root (restart the commit).
If you stick with standard advice, trying to update your working copy you’ll find out something interesting: Nothing is out of date! You just can’t commit!!!
One solution that I found, but I don’t know all the consequences of doing this so DON’T BLAME ME if you lose important local properties in your repository is the following :
1) Go to the directory in your working copy that contains the problem file.
2) Delete .svn/all-wcprops from there.
That’s it. Commit and be happy. PS: All I can say is that this has not crashed any of my working copies yet.
ASP .Net Page.Header with custom meta tags
Jul 5th
One of this days a friend of mine shared with me some SEO techniques and one of them was to change the meta tags associated with a product page. So after a little research I found out a way to accomplish this : modify the Header property of ASP .Net page and add several HtmlMeta tags who can hold the data needed to be changed.
Each ASP .Net page has a property called Header who is the “hidden” header code of each HTML page. It is available starting with .Net version 2.0 and exposes also the meta tags object collection. Actually, all elements in the header are available in Header.Controls
// Render: HtmlMeta meta1 = new HtmlMeta(); meta1.Name = "keywords"; meta1.Content = "pharmacy, online pharmacy, home delivery"; // Render: HtmlMeta meta2 = new HtmlMeta();meta.Name = "verify-v1";meta.Content = "DmMArCJQq9KV45wvKMwrWASh3R8UWTd7NfBD"; // Render: HtmlMeta meta3 = new HtmlMeta();meta.Name = "revisit-after";meta.Content = "2 days"; Header.Controls.Add(meta1);Header.Controls.Add(meta2);Header.Controls.Add(meta3);
Euro
Lira sterlina
Dolar SUA
Francul elvetian
Gramul de aur



