Blogvaria

This page is brought to you by Blogvaria (http://blog.evaria.com).

To obtain more information, ask questions and interact please visit our website.

Back to Blogvaria landing page
Feedback
Subscribe
   
Blogvaria

 

The personal pages

Posts filed in 2010

Introducing Teamviewer

TeamViewer is a simple and fast solution for remote control, desktop sharing and file transfer that works behind any firewall and NAT proxy.

Filed under Internet stuff, Software | 1 Comment

Billy Connolly – Colonoscopy

Billy Connolly describing the prep for a colonoscopy…. funniest thing ever.

Filed under Entertainment, Humour | No Comments

Using PHP to print only the first sentence

Ever wanted to pull just the first sentence of a text and print it? If yes, this is for you.

Simply add the following code (in PHP) to your page/system before the actual HTML stuff begins:

< ?php
function getFirstSentence($string)
{
    // First remove unwanted spaces - not needed really
    $string = str_replace(" .",".",$string);
    $string = str_replace(" ?","?",$string);
    $string = str_replace(" !","!",$string);
    // Find periods, exclamation- or questionmarks with a word before but not after.
    // Perfect if you only need/want to return the first sentence of a paragraph.
    preg_match('/^.*[^\s](\.|\?|\!)/U', $string, $match);
    return $match[0];
}
?>

Then call the function somewhere on the page where you want the text to appear:

< ?php
    // The $string below could/should be a text string pulled from your database or similar
    $string = "Lentence oneasdasd asd asd asdasd, ?. Sentence two? Sentence three! Sentence four.";
    echo getFirstSentence($string);
?>

Comes in handy for search result pages, page titles and similar listings.

Filed under Programming | No Comments

World Cup 2010 Calendar

Keep yourself up-to-date with this nifty calendar showing all games and results from this years World Cup in football. Simply click the image below to open it:

May the best team win – I’m betting on Spain :)

Filed under Entertainment | 1 Comment

The World’s Most Expensive Heavy Bike

Dodge Tomahawk is a bike which was produced by Dodge manufacturers and it was unveiled in “North American International Auto Show” in 2003. It has a very unusual design that inspire every bike admirer and especially the “speed bike lovers”. It has a 8.3 L V10 engine which can produce 500hp. It has a maximum speed of 370 miles per hour which produces torque of 712 Nm. Its front brake has 16 piston disk and back brake has 8 piston disk. The weight of bike is approximately 1500 pounds (680 kg) and has price about $ 555,000. I also like to mention its fuel capacity which is 12.3 liters.

More info and photos here.

Filed under Gadgets | No Comments


Page 1 of 512345»

Quick links - Blogvaria time links [ sitemap ]

2010 | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec

2009 | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec

2008 | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec

2007 | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec

2006 | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec

Akismet has protected Blogvaria from 114,720 spam comments. Design by Evaria.com. Powered by WordPress.
Our beloved and trusted server has rendered 553 pages so far today, an amazing 3.184 pages yesterday
and even more astonishingly 172.613 pages since 09 Jun 2010 alone without dropping a byte nor a pixel.

Close
E-mail It