Quantcast
Channel: JPHellemons
Viewing all 132 articles
Browse latest View live

Add touch support to jQuery UI

$
0
0

When you have a slider control with jQuery UI

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js"></script><link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/smoothness/jquery-ui.css"/><script>
    $(function() {
        $( "#slider" ).slider();
    });</script><div id="slider"></div>

All you have to do to add touch support (for tablets such as the iPad) is add this small library from GitHub

https://raw.github.com/furf/jquery-ui-touch-punch/master/jquery.ui.touch-punch.min.js source: http://touchpunch.furf.com/

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js"></script><script type="text/javascript" src="https://raw.github.com/furf/jquery-ui-touch-punch/master/jquery.ui.touch-punch.min.js"></script><link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/smoothness/jquery-ui.css"/><script>
    $(function() {
        $( "#slider" ).slider();
    });</script><div id="slider"></div>

And that’s all!

kick it on DotNetKicks.comShout it


Raspberry Pi with RaspBmc

$
0
0

A lot of (IT)people have heard of the raspberry pi. It is a tiny cheap computer. There are two models, model A and B. The difference between model A and B is the network (lan) connection.

Order a Raspberry pi

I have bought a model B at http://export.farnell.com/rp/order/

The raspberry pi was ordered at 23th of August and it arrived in the Netherlands at 11th of September. So that’s less then the 3 weeks that element14 mentions on the website. A fast SD card is recommended. So I have bought an 8GB Transcend class 10 card (for only 8 euro’s).

As programmer you should have an HDMI cable available and network connection and micro-usb power supply.

Make a HTPC from your Raspberry

In 2003 there was a project started to make an Xbox act as HTPC. This project was named XBMC (X-Box Media Center). The software is still available for the X-Box, but also for various number of other platforms.

As you might know, you can install various Linux distributions on your raspberry. A lot of them are listed on the official raspberry pi website. There is even a special distro for XBMC on your Raspberry pi called RaspBmc. It is super easy to install (when you run windows). Insert your (fast) SD card and download the Windows RaspBmc installer. Unzip and hit install. When you are done, put the SD in your pi and connect the LAN, HDMI and power up! It might take a while, so grab some coffee. If if fails downloading the updates, remove the power and try again after a few seconds. It should look like this after 30 minutes:

http://www.xbmcfreak.nl/wp-content/uploads/2011/05/confluence_hor.jpg

Remotes

To work with it without usb keyboards or mice, you need a remote. Of course you can get a real remote. Some are supported out of the box. But it is now 2012 and everybody has a tablet and/or smartphone! So I downloaded the official XBMC remote for Android devices.

Airplay support

When you have your remote, you can enable Airplay support, so that you can send pictures and videos from your iPad/iPhone to the RaspBmc. You can enable it under

System –> Network –> “Allow XBMC to receive Airplay content”

Responsive UI

To make the user interface of XBMC more responsive, you can switch the skin to a more lightweight skin. The default skin is confluence

But for a system with limited resources like the raspberry pi, it’s better to move to Quartz.

So now you have a cheap good solution to add Airplay to your TV and play all kinds of files stored on the LAN.

The next step is to add DVR/PVR support and live TV. I can now use airplay from my iPad, so that’s great! Get yourself a Raspberry pi now!

Have fun with your Raspberry Pi!

p.s. the url for the official iOs XBMC remote.

My first Nancy webapplication

$
0
0
Sinatra Framework Logo

As web developer you might have heard of Sinatra. Not the famous artist, but the Sinatra framework! It is a framework/Domain Specific Language (DSL) for Ruby to quickly create web applications with minimal effort.

Nancy is a lightweight framework which is inspired by Sinatra. It has been around since November 2010 and a few days ago there was the Nancy 0.12 release.

So it's time to give this a try and make my own first Nancy web application.

My first Nancy web app

Launch visual studio and File -> New project -> ASP.NET Empty Web application

File new Asp.Net empty web app project

Right click on the project in the solution explorer and select ‘Manage NuGet packages’

Solution explorer

Type in Nancy.Hosting.Aspnet This NuGet package depends on Nancy 0.12 which is automatically installed when you hit the Install button

Nancy Nuget package

Add a new class HelloNancy.cs

Make it inherit NancyModule

type in the default constructor

Get["/"] = parameters => "Hello World";

And don’t forget to add

using Nancy;

Your full code of HelloNancy.cs should look something like

using Nancy;

namespace MyFirstNancyWebApp
{
    public class HelloNancy: NancyModule
    {
        public HelloNancy()
        {
            Get["/"] = parameters => "Hello World";
        }    
    }
}

And hit F5 to build

This gives you a nice and clean hello world:

hello world in firefox

If you add (below the previous Get…) this line:

Get["/hello/{name}"] = parameters => "Hello " + parameters.name;

 

And go to /hello/yourname

hello world in firefox with parameter

Nancy is build for the web in a developer friendly way. Now you use HTTP GET requests, but you can also use the POST and DELETE. The routing can work with regular expressions and is very powerful.

But besides the query string, you can also accept JSON, XML etc. out of the box with a single line of code!

But this sample does not contain any HTML! Well you can do that by adding a view. So add a folder called views and add a products.html file.

When you add this line:

Get["/products"] = parameters => View[new ProductsModel()];

and this class to your solution:

public class ProductsModel
{
    public string Code { get; set; }
    public string Name { get; set; }
}

Nancy will look in the views folder for a view called products.

When you use @!Model.Code in your products.html you can show the bound value of the productsmodel object in html.

Get["/products"] = parameters => View["products.html", new ProductsModel(){Code="C1009", Name ="Product name here"}];

You can read more about it here:

https://github.com/NancyFx/Nancy/wiki/Documentation

You can also download my small sample project from Github.

Nancy is open source under an MIT license and available on GitHub. So you can fork it and make pull requests etc.

Good luck coding!

 

ps. if you want to see some octocat’s (Github logo) check out this Octodex!

kick it on DotNetKicks.comShout it

CouchDB for windows, really relaxed

$
0
0

couchCouchDB is a non-relational, no-sql database which is build relying on the HTTP stack. It’s from the apache foundation.

The Wiki of CouchDB provides this info about the windows version.

Installation of CouchDb on Windows

The current release (at the moment of writing) is 1.1.1 and it’s up on Github.

Their wiki gave me this download file:

CouchDB for windows download

As Dave pointed out in the comments, you should download 1.2 now from https://couchdb.apache.org/#download. Thanks Dave!

You can open it and keep all the default settings.

After the installation completes, you can visit http://127.0.0.1:5984

You would see this:

CouchDB on windows installation succes

The management tool, Futon, can be reached in subdirectory _utils.

So just click on this link to see the CouchDB’s version of “PhpMyAdmin”

http://127.0.0.1:5984/_utils/ 

CouchDB Futon

So you are good to go!

More details about CouchDB on Windows can be found on the Quirks page.

But that’s optional.

Setup CouchDb

With the default installation, you will see this message:

image

It is recommended to create one Admin user. You can create a database afterwards by clicking on the top left link.

image

You can set the security of the CouchDb if you have added some more users, but we will skip that for the moment and start using the database from our Asp.Net WebForm web application.

Asp.Net and CouchDb

There are a lot of options to access CouchDb. You can do everything manually, since it is just a combination of JSON and REST. But there are also a lot of wrappers available which support streaming and/or POCO etc.

Lots of benefits which differ from wrapper to wrapper. The official documentation of CouchDb recommends the following:

 

When you look for Nuget packages with the keyword CouchDb you will only find LoveSeat and DreamSeat at the moment. Both are using Json.Net a.k.a. Newtonsoft.Json. NuGet will pull that reference in, so don’t worry. I just mentioned it, so that you know that you can use that library to parse objects to JSON.

If you look for resources for CouchDB, you will see a lot Unix oriented. A lot requires CURL. You can get it for windows, or (recommended) get Git for windows and get curl for free http://superuser.com/a/483964/24642

You can read more about that on the run curl commands with windows thread on superuser.

This is my DreamSeat code. The blog object is a test object with comments etc. just to fill the database with a JSON serializable object with related objects.

private void TestDreamSeat()
{
    var blog = GetBlog();
    var client = new DreamSeat.CouchClient();

    var db = client.GetDatabase("southwind");
    DreamBlog dream =(DreamBlog)blog;

    dream = db.CreateDocument<DreamBlog>(dream, new Result<DreamBlog>()).Wait();

    DreamBlog myObj = db.GetDocument<DreamBlog>(dream.Id);
    Response.Write(myObj.Name);
    db.DeleteDocument(myObj);
}

And this is my LoveSeat test

private void TestLoveSeat()
{
    var blog = GetBlog();
    var client = new LoveSeat.CouchClient();

    var db = client.GetDatabase("southwind");

    string blogAsJson = JsonConvert.SerializeObject(blog);
    var doc = new Document(blogAsJson);
    doc.Id = new Guid().ToString();
    doc = (Document) db.CreateDocument(doc);

    Blog myObj = db.GetDocument<Blog>(doc.Id);
    Response.Write(myObj.Name);
    db.DeleteDocument(doc.Id, doc.Rev);
}

I used the

System.Diagnostics.Stopwatch
class to measure the differences and I was planning to test all the libraries that I have found and mentioned earlier. But I believe that the best solution is to stick with the libraries that are in the NuGet repository, because other libraries might be outdated.

Get the sample code from:

https://github.com/jphellemons/CouchDbFromDotNet

Good luck coding!

kick it on DotNetKicks.comShout it

Move to Windows 8

$
0
0

This post is about my 2 cents about upgrading from Windows 7 pro x64 to Windows 8 pro. I have been a Windows user since 3.11 and have never upgraded a Windows installation. I have been clean installing all versions.

Hardware background

My Dell notebook is from 2009. It had Vista installed by default and was ready for Windows 7. In fact, it came with a free upgrade from Dell.

I have blogged about my win8 test drive earlier. It still had the windows start button in that build and had no metro/live tiles. It is almost a year ago.

My dell xps16 has a limit of 4gb and has an Samsung 830 SSD 128gb as laptop upgrade kit (which is really recommended).

Upgrading to windows 8

My first step was to make a backup. I had backups around because SSD can fail in a blink of an eye. As side note: my Samsung drive has never let me down. In fact, it made my Windows 7 really fast!

I ran the upgrade advisor/assistant and uninstalled Ultramon, Visual Studio 2010 (used 2012 anyway) and Office 2010 (used the 2013 preview of Office 365).

So the upgrade was just a next, next finish thing and took about 2 hours and several reboots. After that, my system was good to go.

windows-toets_2394284

Reasons to upgrade to win8

1. speed

This is actually enough reasons already to upgrade.

  • Boot time reduction (cold boot)
  • More responsive user interface in use
  • Return from hibernate is faster
  • File move/copy dialog feels faster and has more details

2. shortcuts

The Windows key is everything! I already used the key a lot in win7, but now even more! Here are the shortcuts I used in Windows 7:

  • windows key + E for explorer
  • windows key + M to minimize all and go to desktop
  • windows key + start typing to launch an application
  • windows key + F to search a file
  • windows key + shift + arrow to move window to other screen
  • windows key + digit to activate pinned application nr# on taskbar
  • windows key + L to lock the account
  • windows key + R to run

and now the additional for windows 8:

  • windows key + C to control the current application (app specific settings)
  • windows key + W to search in control panel
  • windows key + X for power/super user quick menu

3. Backup

You now have file history! The files are stored like normal files so you can access them easily. You can also set Windows back to a fresh install!

4. Security

Bitlocker in already in pro and also Bitlocker portable. In Windows Vista and Windows 7 you needed the ultimate or enterprise edition to have Bitlocker.

Auto updates are installed in the background. So non-tech people have secure and up to date systems with win8.

5. Other

it has a lot of changes under the hood. With printer drivers and direct X and all those changes make windows 8 fast!

metro/live tiles

don’t be scared. I have no touch enabled device and use Visual Studio 2012 and Office 2013 all the time. I only notice the new metro stuff when I login and press the windows key. But it is so responsive and fast that it is not annoying. And you can control everything with the keyboard. Also all the metro stuff! So there is NO reason not to upgrade! I am running Windows 8 in desktop mode the whole day. There are some small applications that give you back a start button. But if you actually require those hacks, you are using the operating system not how it’s meant to be used.

So to conclude this post: Upgrade from Windows 7 to 8 today! It’s only 30 euro’s according to the upgrade assistant. So it’s a bargain!

Have fun with your new OS!

Excel file corrupt in Windows 8

$
0
0

294528-microsoft-office-365-and-office-2013A while ago, I made something in Asp.Net with CarlosAg Excel XML Writer Library. This is a free component to generate Excel (.xls) documents (xml). It does not require an installation of Office on your IIS server.

Here is a code sample to show how easy it works.

using CarlosAg.ExcelXmlWriter;

class TestApp {
    static void Main(string[] args) {
        Workbook book = new Workbook();
        Worksheet sheet = book.Worksheets.Add("Sample");
        WorksheetRow row =  sheet.Table.Rows.Add();
        row.Cells.Add("Hello World");
        book.Save(@"c:\test.xls");
    }
}

The downside is that it is a library dated from 2005 and it has no xlsx support (office 2010, office 365). But it works!

So I made an generic handler (.ashx) which gives this popup to download the Excel workbook.

public void ProcessRequest (HttpContext context) {
    context.Response.ContentType = "application/vnd.ms-excel";
    context.Response.AddHeader("Content-Disposition", "attachment; filename=Report-" + DateTime.Now.ToString("yyyy-MM-dd") + ".xls");

    GenerateMyExcel gme = new GenerateMyExcel ();
    Workbook book = gme.GetExcelReport();
    
    book.Save(context.Response.OutputStream);
}

And I also made a method which takes this workbook and attaches it and mails it.

MailMessage msg = new MailMessage("from@mydomain.com", "to@mydomain.com", "Report", "look at attachment");
GenerateMyExcel gme = new GenerateMyExcel();
Workbook book = gme.GetExcelReport();
MemoryStream ms = new MemoryStream();
book.Save(ms);
Byte[] byteArray = ms.ToArray();
ms.Close();
MemoryStream StreamToAttach = new MemoryStream(byteArray);
msg.Attachments.Add(new Attachment(StreamToAttach, "report.xls"));

SmtpClient sc = new SmtpClient();
try
{
    sc.Send(msg);
}
catch (Exception ex)
{
    System.Diagnostics.Debug.WriteLine(ex.Message + " " + ex.StackTrace);
}
StreamToAttach.Close();

But When I opened the file, my excel in Office 365 Home Premium Preview on Windows 8, I get this “File is corrupt” message.

image

image

Was this information helpful? Seriously?

Hours debugging later, I found out that it was a security issue. When you open the properties of the file (and have a Dutch Windows):

report-prop

There is this security message: “This file came from another computer and might be blocked…” So When I hit ‘unblock’ and ‘ok’, I can open the file normally!

This took me a day, because I thought that there was some thing with the CarlosAg library which made my file corrupt. Like setting a cell to number when there is a string inside.

The next time that I want to generate an Excel file, I will use EPPlus.

Masonry, Isotope and the gutters

$
0
0

You know Pinterest? And would like a layout like Pinterest? Well I did and came across this jQuery Masonry plugin.

But I wanted to do some sorting and filtering with the elements. The Masonry which is released with an MIT license does not have this functionality. Isotope does, but has a $ 25,- license for commercial use and is free for personal use.

This quote from StackOverflow explains the difference between masonry and isotope:

To some people Isotope would look very similar to the work you had previously done with Masonry; can you explain the main differences between the two?

Isotope has several features that Masonry lacks. Masonry essentially does one thing, placing item elements in a cascading arrangement. Isotope has Masonry’s layout logic built in, but in addition, it also has several other layout modes that can be used to dynamically position elements. You can even develop your own custom layout mode.

As I’ve mentioned, it has filtering and sorting functionality built in. Filtering items is as easy as passing in a jQuery selector:

$('#container').isotope({ filter: '.my-selector' });

Isotope takes advantage of the best browser features out there. Instead of using typical left/top styles positioning, Isotope takes a progressive enhancement approach and uses CSS transforms if supported by the browser. This provides for top-notch performance for top-notch browsers. With hardware acceleration kicking in, animations look silky smooth on WebKit browsers, and even less-powerful devices using iOS. CSS transforms perform better with CSS transitions, which I’ll discuss later.

 

You can use isotope to make something look like a masonry layout.

$('#container').isotope({
  masonry: {
    columnWidth: 110,
    gutterWidth: 10
  }
});

But Somehow the gutters don’t show up. So you need a custom layoutmode for Isotope. I have found it in the sourcecode of the example: http://isotope.metafizzy.co/custom-layout-modes/masonry-gutters.html

Here is the javascript code:

// modified Isotope methods for gutters in masonry
$.Isotope.prototype._getMasonryGutterColumns = function () {
    var gutter = this.options.masonry && this.options.masonry.gutterWidth || 0;
    containerWidth = this.element.width();

    this.masonry.columnWidth = this.options.masonry && this.options.masonry.columnWidth ||
        // or use the size of the first item
        this.$filteredAtoms.outerWidth(true) || 
        // if there's no items, use size of container
        containerWidth;

    this.masonry.columnWidth += gutter;

    this.masonry.cols = Math.floor((containerWidth + gutter) / this.masonry.columnWidth);
    this.masonry.cols = Math.max(this.masonry.cols, 1);
};

$.Isotope.prototype._masonryReset = function () {
    // layout-specific props
    this.masonry = {};
    // FIXME shouldn't have to call this again
    this._getMasonryGutterColumns();
    var i = this.masonry.cols;
    this.masonry.colYs = [];
    while (i--) {
        this.masonry.colYs.push(0);
    }
};

$.Isotope.prototype._masonryResizeChanged = function () {
    var prevSegments = this.masonry.cols;
    // update cols/rows
    this._getMasonryGutterColumns();
    // return if updated cols/rows is not equal to previous
    return (this.masonry.cols !== prevSegments);
};

$(window).load(function(){
    $('#container').isotope({
        masonry : {
            columnWidth: 110,
            gutterWidth: 10
        },
        itemSelector: '.item',
        animationEngine: 'best-available',
        animationOptions: {
            duration: 750,
            easing: 'linear',
            queue: false
        }
    });
});

Good luck with the jQuery Isotope plugin!

kick it on DotNetKicks.comShout it

IE8 does not @import my CSS

$
0
0

CSS media queries are common these days. So I googled an example which I could modify to my needs for a nice cross browser, cross device compatible web application. I came up with:

@import url("/css/desktop.css") only screen;

/* Smartphones (portrait and landscape) ----------- */
@import url("/css/smartphone.css") only screen and (min-device-width : 320px) and (max-device-width : 480px);

/* Smartphones (landscape) ----------- */
@import url("/css/smartphone-landscape.css") only screen and (min-width : 321px) and (max-width : 800px);

/* Smartphones (portrait) ----------- */
@import url("/css/smartphone-portrait.css") only screen and (max-width : 320px);

/* iPads (portrait and landscape) ----------- */
@import url("/css/ipad.css") only screen and (min-device-width : 768px) and (max-device-width : 1024px);

/* iPads (landscape) ----------- */
@import url("/css/ipad-landscape.css") only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape);

/* iPads (portrait) ----------- */
@import url("/css/ipad-portrait.css") only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait);

/* iPhone 4 ----------- */
@import url("/css/iphone4.css") only screen and (-webkit-min-device-pixel-ratio : 1.5), only screen and (min-device-pixel-ratio : 1.5);

This looks great, but… it didn’t work in IE8. I have spend a long time searching the web, why it didn’t work. I added a

body { margin-top: 0px; }

as was suggested in this StackOverflow thread. But that didn’t work either.

 

 

ie8-css-import

I verified that the css was linked correctly. I was loaded, only the import wasn’t. There was also a resource online which said that the CSS imports should be first in the document for Internet explorer. But that also did not matter.

After browsing for a while, I stumbled upon an MSDN page.

http://msdn.microsoft.com/en-us/library/ie/ms530768%28v=vs.85%29.aspx

and there it was. –evan— pointed out that according to the w3 organization.

So that user agents can avoid retrieving resources for unsupported media types, authors may specify media-dependent @import rules. These conditional imports specify comma-separated media types after the URI.

source: http://www.w3.org/TR/CSS2/cascade.html#at-import

So this is in CSS 2 which became a recommendation in 1998. it was started in 1997 and Internet explorer 8 was released on 19 March 2009. That is over 10 years later!

So removing the ‘only screen’ from the CSS I posted earlier fixed it!

Thank god for standards!


Application pool crashes with BlogEngine 2.7

$
0
0

This is de default of BlogEngine 2.7:

<?xml version="1.0"?><configuration><system.web><httpRuntime 
            enableVersionHeader="false" 
            useFullyQualifiedRedirectUrl="true" 
            maxRequestLength="16384" 
            executionTimeout="3600" 
            requestLengthDiskThreshold="16384" 
            requestValidationMode="2.0"/><pages 
            enableSessionState="false" 
            enableViewStateMac="true" 
            enableEventValidation="true" 
            controlRenderingCompatibilityVersion="3.5" 
            clientIDMode="AutoID">
            ...</pages></system.web></configuration>

And I have used these settings for quite a while. But my application pool keeps crashing after about a week.

I have enabled elmah logging

<elmah><errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/elmahErrors" /></elmah>

This enabled me to have a better look at what was causing the crashes. Because the elmah page is of course unavailable when BE crashes. The log had several error’s the two most common ones where:

  • A potentially dangerous Request.Path value was detected from the client
  • Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
I have now added:
validateRequest="true"

to my pages section in the web.config and have added:

requestPathInvalidCharacters=""

to the httpRuntime section and my error logging feature stays empty and the BlogEngine application returns a nice 404 when trying some querystring injection and/or XSS attacks.

So this will fix all the thrown exceptions and keeps my application pool from automatically shutting down. I have found this on StackOverflow http://stackoverflow.com/a/6026291/169714 but turning off the validateRequest seems like a bad idea.


Good luck with BlogEngine!

kick it on DotNetKicks.comShout it

Change Notepad++ icon to Metro style

$
0
0

I have been running Windows 8 now for a while and have been using Notepad++ for a long time. It is my favorite notepad replacement. It has great syntax highlighting and is fast and lightweight. The only downside is that there is no updated icon for windows 8.

The current icon is from 2010 and looks great, but it does not fit in the new Microsoft UX design guidelines. There was this free nice looking icon on the web:

source: http://www.softicons.com/free-icons/system-icons/windows-8-metro-icons-by-dakirby309/notepad-icon

Which looks imho better on the Windows 8 desktop. So I have downloaded version 3.6 of resource hacker from this website: http://www.angusj.com/resourcehacker/ direct link to resource hacker 3.6. After installing and launching it you can open for example: C:/Program Files (x86)/Notepad++/notepad++.exe and navigate in the treeview to icon/1

image

at action you can replace icon with the .ico file which you can download from the softicons url above. Save the ‘new’ .exe in the same folder as Notepad++ and right click on a .txt file, select ‘open with’ and navigate to the ‘new’ .exe.

 

Another icon option is this image from SalvoGentile from deviantart, it looks nice but you have to convert it to .ico yourself.

 

Good luck!

HTML5 Webcam monitor

$
0
0

We have several IP camera’s in the building for security purposes. They all have internal IP addresses and can be viewed separately with their own web interface which is Chinese by default Laughing out loud and does not remember the language setting.

wanscam webinterface

It has 3 options: download an active X component and only work in internet explorer. Or use server push or a version build with JavaScript.

It refreshes the url by adding a new random number to the image source:

new Date().getTime() + Math.random();

This inspired me to make an overview webpage of all the webcams in our LAN.

Since it might be accessed through a mobile device, I have used the responsive version of the twitter bootstrap. For the small source and the caching of browsers, I have used the jQuery library and the twitter one from CDN’s.

I have used jQuery 1.9.1 and bootstrap 2.3.1 and that is all there is. Please let me know if you have any suggestions to make it even better. For demo purposes I have not changed the logins of the Wanscams and used the factory settings.


You can fork this code on GitHub. or view the code of the single HTML page on this url: https://github.com/jphellemons/WebcamMonitor/blob/master/index.html

kick it on DotNetKicks.comShout it

Enable PHP session WebMatrix 3

$
0
0

A while ago I was working on an PHP project and decided to give the new WebMatrix a try because it has PHP support. The installation with the web platform tool is painless. When I opened the PHP project, WebMatrix noticed that I did not had PHP installed and it was installed automatically. awesome! When I downloaded, installed and configured MYSQL on my Windows 8 machine it was all good to go. Only the existing code did not work. It took me a while to realize that my MYSQL connection was working fine. After a while I figured out that the session variable was not filled.

A small phpinfo file with the famous

<?php phpinfo(); ?> 

Told me that the error_log was located at C:\WINDOWS\temp\php53_errors.log and that file told me

[21-May-2013 17:39:40 Asia/Kuwait] PHP Warning:  Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\WINDOWS\temp) in Unknown on line 0

So I tried to open the path manually and it required Administrator rights.

To fix this I had to change session.save_path to an other directory.

So you have to open the php.ini file. Mine was located in the folder C:\Program Files (x86)\IIS Express\PHP\v5.3\

and search for a line which isn’t commented out and has the session.save_path=C:\windows\temp and replace it with a writeable path.

 

Happy programming with WebMatrix 3!

 

kick it on DotNetKicks.comShout it

Move Blogengine.net from shared hosting to Azure

$
0
0
http://az83882.vo.msecnd.net/css/6.0.6002.18488.130611-1605/images/logo.png

This blog is online since April 2010 and has suffered from the Google Penguin update. The Blog has been on shared hosting since the beginning. But the shared hosting price plan is static and the Windows Azure price plan is based on how much you use it. So in my case, it will be cheaper to move to the cloud and azure also makes my blog more available.

This screenshot from Google Analytics once again proves that Google Penguin update did harm my blog’s traffic (24 April 2012)

google-penguin

Somehow my Blogengine.net 2.7 and also 2.8 installation on shared hosting keep getting errors which caused the IIS application pool to crash. It did not auto restart, so I had to bother the hosting company every two weeks to restart it manually. My installation keeps getting errors and I still need to look in for that, but Azure keeps working.

[youtube:0St9B1kmJ2g]

So I downloaded everything by ftp from the shared hosting and uploaded it on the azure hosting. When I hit my site by clicking on the url in the azure portal it failed to launch. So I’d reconnect with ftp and downloaded the errorlog.xml from azure.

I opened it in notepad++ which has XML syntax highlighting and it was the first event (when I clicked plugins –> xml tools –> pretty xml)

 

error CS0433: The type 'System.Web.WebPages.HelperPage' exists in both

So I opened the web.config of blogengine and went down to the assemblies and commented out the last three. Reuploaded the web.config and the BlogEngine installation runs fine!

webconfig-blogengine-azure

There was also an issue with the SMTP settings. So I googled for the smtp settings of gmail as smtp provider for blogengine and found out that the port 467 is not the correct one!

You need this XML for your web.config in order to get the smtp of gmail to work:

<system.net><mailSettings><smtp deliveryMethod="Network" from="capsoft@gmail.com"><network 
          host="smtp.google.com" 
          userName="yourGoogleId@gmail.com" 
          password="yourPassword" 
          port="25" 
          enableSsl="true" 
          defaultCredentials="false"/></smtp></mailSettings></system.net>

This page in the Blogengine discussion board pointed me in the right direction.

 

Good luck!

kick it on DotNetKicks.comShout it

Debug KnockoutJS

$
0
0

ko-logoKnockout is awesome, but as a Knockout beginner, it was hard for me to debug. After reading a lot about Knockout, I found a Stackoverflow thread about how to debug KO. This post about Knockout Strategies is a must read! The SO question I mentioned earlier inspired me to create my first snippet.

I prepended some HTML to display the output on the left side of the screen. Here is the code:

<div style="position: absolute; top:0px; left:0px; height: 100%; width: 400px; overflow: auto; background-color: rgba(255,255,255,0.8);color: black; background-image: url(http://knockoutjs.com/img/ko-logo.png); background-repeat:no-repeat; background-position: top center; padding-top:125px;"><pre data-bind="text: ko.toJSON($data, null, 2)"></pre></div>

And here is the snippet code:

<?xml version="1.0" encoding="utf-8"?><CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"><CodeSnippet Format="1.0.0"><Header><Title>
        Knockout Debug</Title><Author>JP Hellemons</Author><Shortcut>Kodbg</Shortcut></Header><Snippet><Code Language="html"><![CDATA[<div style="position: absolute; top:0px; left:0px; height: 100%; width: 400px; overflow: auto; background-color: rgba(255,255,255,0.8);color: black; background-image: url(http://knockoutjs.com/img/ko-logo.png); background-repeat:no-repeat; background-position: top center; padding-top:125px;"><pre data-bind="text: ko.toJSON($$data, null, 2)"></pre></div>
        ]]></Code></Snippet></CodeSnippet></CodeSnippets>

The dollar sign needs to be escaped. You can download the snippet and open the ‘Code Snippet Manager’ in Visual Studio with CTRL+K, CTRL+B and import the snippet file.

The shortcut is Kodbg (and then tab)

 

Good luck!

 

kick it on DotNetKicks.comShout it

No need for a sysadmin, use Azure

$
0
0

The 26th of July is international Sysadmin appreciation day. But that is no longer needed, because we have Azure!windowsazure-logo2 You can do a lot in the cloud! And I recently found an awesome feature. I was looking to get a Windows 2012 machine up and running and found out that there is only a datacenter version as option or a 2012 R2 preview. And the preview expires in 60 or 90 days. But I don’t want my 2012 machine to expire and think that the datacenter edition is an overkill for running a simple SQL database and run IIS. So I clicked around a bit and found this:

azure-portal

At the virtual machine option, there is this top menu with ‘Virtual Machine Instances’, ‘Images’ and ‘Disks’. And under the images option there is this ‘Browse VM Depot’ option. This gives a HUGE list with preconfigured virtual machines! I have copied the list from the HTML source.

a-blog cms 1.6.2.1 on CentOS
Alfresco 4.2.c-2 (Ubuntu 12.10)
Alfresco 4.2.c-3 (Ubuntu 12.10)
Apache 2.2.15 on OpenLogic CentOS 6.3
Apache Solr 4.1.0-0 (Ubuntu 12.10)
Apache Solr 4.1.0-1 (Ubuntu 12.10)
Apache Solr 4.2.0-0 (Ubuntu 12.10)
Apache Solr 4.2.1-0 (Ubuntu 12.10)
Apache Solr 4.3.0-0 (Ubuntu 12.10)
Apache Solr 4.3.1-0 (Ubuntu 12.10)
Apache Solr 4.3.1-1 (Ubuntu 12.10)
Apache/2.2.12 on SUSE Ent Server 11 SP2
Artifactory 3.0.2-0 (Ubuntu 12.10)
Azure Data Science Core
BitNami concrete5 Stack 5.6.1.2-0 (Ubuntu 12.10)
CassandraByOzeanSoft
Chyrp 2.5rc1-0 (Ubuntu 12.10)
CKAN 2.0 DB
CKAN 2.0 Web
concrete5 5.6.0.2-0 (Ubuntu 12.10)
concrete5 5.6.1.2-0 (Ubuntu 12.10)
concrete5 CMS 5.6.1.1-0 (Ubuntu 12.10)
concrete5 CMS 5.6.1-0 (Ubuntu 12.10)
Coppermine 1.5.22-0 (Ubuntu 12.10)
Coppermine 1.5.24-0 (Ubuntu 12.10)
Debian GNU/Linux 7.0 wheezy
DevPack 2013.01.08-0 (Ubuntu 12.10)
Discourse 0.8.6-0 (Ubuntu 12.10)
Discourse 0.8.6-1 (Ubuntu 12.10)
Discourse 0.8.7-0 (Ubuntu 12.10)
Discourse 0.8.7-1 (Ubuntu 12.10)
Discourse 0.8.8-0 (Ubuntu 12.10)
Discourse 0.8.9-0 (Ubuntu 12.10)
Discourse 0.9.0-0 (Ubuntu 12.10)
Discourse 0.9.0-1 (Ubuntu 12.10)
Discourse 0.9.1-0 (Ubuntu 12.10)
Discourse 0.9.2.5-0 (Ubuntu 12.10)
Discourse 0.9.2.5-1 (Ubuntu 12.10)
Discourse 0.9.2-0 (Ubuntu 12.10)
Discourse 0.9.3.5-0 (Ubuntu 12.10)
Discourse 0.9.3-0 (Ubuntu 12.10)
Discourse 0.9.4-0 (Ubuntu 12.10)
Django Stack 1.3.7-0 (Ubuntu 12.10)
Django Stack 1.4.4-0 (Ubuntu 12.10)
Django Stack 1.4.5-0 (Ubuntu 12.10)
Django Stack 1.5.1-0-dev (Ubuntu 12.10)
Django Stack 1.5-0-dev (Ubuntu 12.10)
Django Stack 1.5b2-0-dev (Ubuntu 12.10)
Django Stack 1.5c2-0-dev (Ubuntu 12.10)
DokuWiki 20121013-0 (Ubuntu 12.10)
DokuWiki 20130510-0 (Ubuntu 12.10)
DokuWiki 20130510a-0 (Ubuntu 12.10)
DreamFactory DSP v1.0.0-azure
Drupal + Odata
Drupal 6.27-0 (Ubuntu 12.10)
Drupal 6.28, LAMP Server on OpenLogic CentOS 6.3
Drupal 6.28-0 (Ubuntu 12.10)
Drupal 7.20, LAMP Server on OpenLogic CentOS 6.3
Drupal 7.20-0 (Ubuntu 12.10)
Drupal 7.21-0 (Ubuntu 12.10)
Drupal 7.22-0 (Ubuntu 12.10)
embela-az-img
Enano CMS 1.1.8-1 (Ubuntu 12.10)
eZ Publish 2012.8-0 (Ubuntu 12.10)
eZ Publish 2013.05-0 (Ubuntu 12.10)
eZ Publish 2013.4-0 (Ubuntu 12.10)
Gallery 3.0.6-0 (Ubuntu 12.10)
Gallery 3.0.7-0 (Ubuntu 12.10)
Gallery 3.0.9-0 (Ubuntu 12.10)
Gitlab 4.2-0 (Ubuntu 12.10)
Gitlab 4.2-1 (Ubuntu 12.10)
Gitlab 5.0.1-0 (Ubuntu 12.10)
Gitlab 5.0-0 (Ubuntu 12.10)
GitLab 5.1.0-0 (Ubuntu 12.10)
GitLab 5.1.0-1 (Ubuntu 12.10)
GitLab 5.1.0-2 (Ubuntu 12.10)
GitLab 5.1.0-3 (Ubuntu 12.10)
GitLab 5.1.0-4 (Ubuntu 12.10)
GitLab 5.2.0-0 (Ubuntu 12.10)
GitLab 5.2.0-1 (Ubuntu 12.10)
GitLab 5.2.1-0 (Ubuntu 12.10)
GitLab 5.3.0-0 (Ubuntu 12.10)
GitLab 5.3.0-1 (Ubuntu 12.10)
Gitorious 2.4.11-0 (Ubuntu 12.10)
Gitorious 2.4.12-0 (Ubuntu 12.10)
Gitorious 2.4.12-1 (Ubuntu 12.10)
Gitorious 2.4.12-2 (Ubuntu 12.10)
Gitorious 2.4.4-2 (Ubuntu 12.10)
Gitorious 2.4.7-0 (Ubuntu 12.10)
Gitorious 2.4.9-0 (Ubuntu 12.10)
HAProxy 1.3.26 on OpenLogic CentOS 6.3
HA-Proxy 1.4.18 on Hardened Ubuntu 12.04 LTS
Horde 5.0.4-0 (Ubuntu 12.10)
Horde Groupware Webmail 5.0.5-0 (Ubuntu 12.10)
Horde Groupware Webmail 5.1.0-0 (Ubuntu 12.10)
INMAWORD
JasperReports 5.0.0-1 (Ubuntu 12.10)
JasperReports 5.1.0-0 (Ubuntu 12.10)
JasperReports 5.1.0-1 (Ubuntu 12.10)
JBoss 7.1.1-3 (Ubuntu 12.10)
JBoss 7.1.1-4 (Ubuntu 12.10)
Jenkins
Jenkins 1.496-0 (Ubuntu 12.10)
Jenkins 1.502-0 (Ubuntu 12.10)
Jenkins 1.508-0 (Ubuntu 12.10)
Jenkins 1.511-0 (Ubuntu 12.10)
Jenkins 1.513-0 (Ubuntu 12.10)
Jenkins 1.515-0 (Ubuntu 12.10)
Jenkins 1.516-0 (Ubuntu 12.10)
Jenkins 1.517-0 (Ubuntu 12.10)
Jenkins 1.519-0 (Ubuntu 12.10)
Jenkins 1.519-1 (Ubuntu 12.10)
Jenkins 1.520-0 (Ubuntu 12.10)
Jetty 9 Web Server (Ubuntu Server 12.04.2 LTS)
Joomla 2.5.7, LAMP Server on OpenLogic CentOS 6.3
Joomla 3.0.2-0 (Ubuntu 12.10)
Joomla! 2.5.10-0 (Ubuntu 12.10)
Joomla! 2.5.11-0 (Ubuntu 12.10)
Joomla! 2.5.9-0 (Ubuntu 12.10)
Joomla! 3.0.3-0 (Ubuntu 12.10)
Joomla! 3.1.0-0 (Ubuntu 12.10)
Joomla! 3.1.1-0 (Ubuntu 12.10)
JRuby Stack 1.7.3-1 (Ubuntu 12.10)
JRuby Stack 1.7.4-0 (Ubuntu 12.10)
JRuby Stack 1.7.4-1 (Ubuntu 12.10)
LAMP Server on OpenLogic CentOS 6.3
LAMP Stack 5.3.23-0 (Ubuntu 12.10)
LAMP Stack 5.3.24-0 (Ubuntu 12.10)
LAMP Stack 5.3.25-0 (Ubuntu 12.10)
LAMP Stack 5.3.26-0 (Ubuntu 12.10)
LAMP Stack 5.4.12-0 (Ubuntu 12.10)
LAMP Stack 5.4.13-0 (Ubuntu 12.10)
LAMP Stack 5.4.13-2 (Ubuntu 12.10)
LAMP Stack 5.4.14-0 (Ubuntu 12.10)
LAMP Stack 5.4.15-0 (Ubuntu 12.10)
LAMP Stack 5.4.16-0 (Ubuntu 12.10)
LAMP Stack 5.4.17-0 (Ubuntu 12.10)
LAMP Stack 5.5.0-0-dev (Ubuntu 12.10)
LAMP Stack 5.5.0RC1-0-dev (Ubuntu 12.10)
LAMP Stack 5.5.0RC3-0-dev (Ubuntu 12.10)
LAMP, PhpmyAdmin on SUSE Lnx Ent Server 11SP2
LAPP Stack 5.3.23-0 (Ubuntu 12.10)
LAPP Stack 5.3.24-0 (Ubuntu 12.10)
LAPP Stack 5.3.25-0 (Ubuntu 12.10)
LAPP Stack 5.3.26-0 (Ubuntu 12.10)
LAPP Stack 5.4.13-0 (Ubuntu 12.10)
LAPP Stack 5.4.13-1 (Ubuntu 12.10)
LAPP Stack 5.4.13-2 (Ubuntu 12.10)
LAPP Stack 5.4.14-0 (Ubuntu 12.10)
LAPP Stack 5.4.15-0 (Ubuntu 12.10)
LAPP Stack 5.4.16-0 (Ubuntu 12.10)
LAPP Stack 5.4.17-0 (Ubuntu 12.10)
LAPP Stack 5.5.0-0-dev (Ubuntu 12.10)
LAPP Stack 5.5.0RC1-0-dev (Ubuntu 12.10)
LAPP Stack 5.5.0RC3-0-dev (Ubuntu 12.10)
Liferay 6.1.1-0 (Ubuntu 12.10)
Liferay 6.1.1-1 (Ubuntu 12.10)
Liferay 6.1.1-2 (Ubuntu 12.10)
Liferay 6.1.1-3 (Ubuntu 12.10)
Liferay 6.1.1-4 (Ubuntu 12.10)
LimeSurvey 200plus20130305-0 (Ubuntu 12.10)
LimeSurvey 200plus20130406-0 (Ubuntu 12.10)
LimeSurvey 200plus20130514-0 (Ubuntu 12.10)
LimeSurvey 200plus20130526-0 (Ubuntu 12.10)
LimeSurvey 200plus20130611-0 (Ubuntu 12.10)
Magento 1.7.0.2,LAMP Server OpenLogic CentOS 6.3
Magento 1.7.0.2-0 (Ubuntu 12.10)
Magento 1.7.0.2-1 (Ubuntu 12.10)
Magento and Wordpress full integration
Magento y Wordpress
MagenWord
Magword
Mantis 1.2.12-0 (Ubuntu 12.10)
Mantis 1.2.14-0 (Ubuntu 12.10)
Mantis 1.2.15-0 (Ubuntu 12.10)
MediaWiki 1.20.2-0 (Ubuntu 12.10)
MediaWiki 1.20.3-0 (Ubuntu 12.10)
MediaWiki 1.20.4-0 (Ubuntu 12.10)
MediaWiki 1.20.5-0 (Ubuntu 12.10)
MediaWiki 1.20.6-0 (Ubuntu 12.10)
MediaWiki 1.21.0-0 (Ubuntu 12.10)
MediaWiki 1.21.1-0 (Ubuntu 12.10)
Merblasa
MongoDB v2.2.3 on Hardened Ubuntu 12.04 LTS
Moodle 2.4.3-0 (Ubuntu 12.10)
Moodle 2.4-0 (Ubuntu 12.10)
Moodle 2.5-0 (Ubuntu 12.10)
Moodle 2.5-1 (Ubuntu 12.10)
Mulberry Symbols
Nagios XI
Natalia Vidal
Neo4j Community 1.8 on Ubuntu 12.04 LTS
Neo4j Community 1.8.2
Neo4j Community 1.8.2
Nervepont Access Manager
Nginx version 1.2.4 on Hardened Ubuntu 12.04 LTS
Node.js 0.10.10-0 (Ubuntu 12.10)
Node.js 0.10.11-0 (Ubuntu 12.10)
Node.js 0.10.12-0 (Ubuntu 12.10)
Node.js 0.10.4-0 (Ubuntu 12.10)
Node.js 0.10.5-0 (Ubuntu 12.10)
Node.js 0.10.9-0 (Ubuntu 12.10)
Node.js 0.8.15-1 (Ubuntu 12.10)
ocPortal 9.0.6-0 (Ubuntu 12.10)
ocPortal 9.0.7-0 (Ubuntu 12.10)
Open Atrium 1.5-0 (Ubuntu 12.10)
Open Atrium 1.7-0 (Ubuntu 12.10)
Openbravo 3.0.MP20 (Ubuntu Server 12.04.2 LTS)
Openerp 7.0-1 (Ubuntu 12.10)
OpenERP 7.0-2 (Ubuntu 12.10)
OpenERP 7.0-3 (Ubuntu 12.10)
openSUSE 12.3 for Windows Azure
Osclass 3.1.1-0 (Ubuntu 12.10)
Osclass 3.1.2-0 (Ubuntu 12.10)
OSQA 1.0rc-2 (Ubuntu 12.10)
ownCloud 4.5.7-0 (Ubuntu 12.10)
ownCloud 5.0.0-1 (Ubuntu 12.10)
ownCloud 5.0.3-0 (Ubuntu 12.10)
ownCloud 5.0.4-0 (Ubuntu 12.10)
ownCloud 5.0.5-0 (Ubuntu 12.10)
ownCloud 5.0.6-0 (Ubuntu 12.10)
ownCloud 5.0.7-0 (Ubuntu 12.10)
Oxid 4.7.4-0 (Ubuntu 12.10)
Oxid 4.7.5-0 (Ubuntu 12.10)
Oxid 4.7.6-0 (Ubuntu 12.10)
phpBB 3.0.11-1 (Ubuntu 12.10)
PhpCompta 6.5.1-0 (Ubuntu 12.10)
PhpCompta 6.5.2-0 (Ubuntu 12.10)
PhpCompta 6.6-0 (Ubuntu 12.10)
Piwik 1.11.1-0 (Ubuntu 12.10)
Piwik 1.12-0 (Ubuntu 12.10)
Plone 4.2.3-0 (Ubuntu 12.10)
Plone 4.2.4-0 (Ubuntu 12.10)
Plone 4.2.5-0 (Ubuntu 12.10)
Plone 4.3.1-0 (Ubuntu 12.10)
Plone 4.3-0 (Ubuntu 12.10)
Pootle 2.1.6-1 (Ubuntu 12.10)
Pootle 2.1.6-2 (Ubuntu 12.10)
Radiant 1.1.3-1 (Ubuntu 12.10)
Radiant 1.1.3-2 (Ubuntu 12.10)
Radiant 1.1.3-3 (Ubuntu 12.10)
Radiant 1.1.3-4 (Ubuntu 12.10)
Redis 2.6.9 on Security hardened Ubuntu 12.04 LTS
Redis Server 2.6.9 Ubuntu 12.04 LTS
Redmine 1.4.7-2 (Ubuntu 12.10)
Redmine 2.2.3-0 (Ubuntu 12.10)
Redmine 2.3.0-0 (Ubuntu 12.10)
Redmine 2.3.0-1 (Ubuntu 12.10)
Redmine 2.3.0-2 (Ubuntu 12.10)
Redmine 2.3.1-0 (Ubuntu 12.10)
Redmine 2.3.1-1 (Ubuntu 12.10)
Redmine 2.3.1-2 (Ubuntu 12.10)
Redmine 2.3.1-3 (Ubuntu 12.10)
ResourceSpace 5.0-0 (Ubuntu 12.10)
ResourceSpace 5.1-0 (Ubuntu 12.10)
ResourceSpace 5.2-0 (Ubuntu 12.10)
Review Board 1.7.10-0 (Ubuntu 12.10)
Review Board 1.7.11-0 (Ubuntu 12.10)
Review Board 1.7.6-0 (Ubuntu 12.10)
Review Board 1.7.7.1-0 (Ubuntu 12.10)
Review Board 1.7.9-0 (Ubuntu 12.10)
Riak
Roller 5.0.1-0 (Ubuntu 12.10)
Roller 5.0.1-1 (Ubuntu 12.10)
Roller 5.0.1-2 (Ubuntu 12.10)
Roundcube 0.9.0-0 (Ubuntu 12.10)
Roundcube 0.9.1-0 (Ubuntu 12.10)
Roundcube 0.9.2-0 (Ubuntu 12.10)
Roundcube 0.9.2-1 (Ubuntu 12.10)
Ruby Stack 1.8.7-1 (Ubuntu 12.10)
Ruby Stack 1.8.7-2 (Ubuntu 12.10)
Ruby Stack 1.8.7-3 (Ubuntu 12.10)
Ruby Stack 1.8.7-4 (Ubuntu 12.10)
Ruby Stack 1.8.7-5 (Ubuntu 12.10)
Ruby Stack 1.8.7-6 (Ubuntu 12.10)
Ruby Stack 1.9.3-10 (Ubuntu 12.10)
Ruby Stack 1.9.3-11 (Ubuntu 12.10)
Ruby Stack 1.9.3-12 (Ubuntu 12.10)
Ruby Stack 1.9.3-4 (Ubuntu 12.10)
Ruby Stack 1.9.3-5 (Ubuntu 12.10)
Ruby Stack 1.9.3-6 (Ubuntu 12.10)
Ruby Stack 1.9.3-7 (Ubuntu 12.10)
Ruby Stack 1.9.3-8 (Ubuntu 12.10)
Ruby Stack 1.9.3-9 (Ubuntu 12.10)
Ruby Stack 2.0.0.rc1-0-dev (Ubuntu 12.10)
Ruby Stack 2.0.0-0-dev (Ubuntu 12.10)
Ruby Stack 2.0.0-1-dev (Ubuntu 12.10)
Ruby Stack 2.0.0-2-dev (Ubuntu 12.10)
Ruby Stack 2.0.0-3-dev (Ubuntu 12.10)
Solr 3.6.1-0 (Ubuntu 12.10)
Solr 4.0.0-0 (Ubuntu 12.10)
Spree 1.2.2-0 (Ubuntu 12.10)
Spree 1.3.1-1 (Ubuntu 12.10)
Spree 1.3.2-0 (Ubuntu 12.10)
Spree 1.3.2-1 (Ubuntu 12.10)
Spree 1.3.2-2 (Ubuntu 12.10)
Spree 1.3.2-3 (Ubuntu 12.10)
Spree 2.0.0-0 (Ubuntu 12.10)
Spree 2.0.1-0 (Ubuntu 12.10)
Spree 2.0.2-0 (Ubuntu 12.10)
Spree 2.0.3-0 (Ubuntu 12.10)
Spree 2.0.3-1 (Ubuntu 12.10)
Subversion 1.7.5-0 (Ubuntu 12.10)
SugarCRM 6.5.11-0 (Ubuntu 12.10)
SugarCRM 6.5.12-0 (Ubuntu 12.10)
SugarCRM 6.5.13-0 (Ubuntu 12.10)
SugarCRM 6.5.14-0 (Ubuntu 12.10)
SugarCRM 6.5.9-0 (Ubuntu 12.10)
TestLink 1.9.6-0 (Ubuntu 12.10)
TestLink 1.9.7-0 (Ubuntu 12.10)
ThinkUp 1.2.1-0 (Ubuntu 12.10)
ThinkUp 1.3.1-0 (Ubuntu 12.10)
ThinkUp 1.3-0 (Ubuntu 12.10)
ThinkUp 2.0.beta.7-0 (Ubuntu 12.10)
ThinkUp 2.0.beta.8-0 (Ubuntu 12.10)
Tiki Wiki CMS Groupware 10.0-0 (Ubuntu 12.10)
Tiki Wiki CMS Groupware 10.1-0 (Ubuntu 12.10)
Tiki Wiki CMS Groupware 10.2-0 (Ubuntu 12.10)
Tiki Wiki CMS Groupware 10.3-0 (Ubuntu 12.10)
Tiny Tiny RSS 1.7.9-0 (Ubuntu 12.10)
Tiny Tiny RSS 1.7.9-1 (Ubuntu 12.10)
Tiny Tiny RSS 1.8-0 (Ubuntu 12.10)
Tomcat 6.0.37-0 (Ubuntu 12.10)
Tomcat 6.0.37-1 (Ubuntu 12.10)
Tomcat 7.0.34-0 (Ubuntu 12.10)
Tomcat 7.0.35-0 (Ubuntu 12.10)
Tomcat 7.0.37-0 (Ubuntu 12.10)
Tomcat 7.0.39-0 (Ubuntu 12.10)
Tomcat 7.0.39-1 (Ubuntu 12.10)
Tomcat 7.0.40-0 (Ubuntu 12.10)
Tomcat 7.0.41-0 (Ubuntu 12.10)
Tomcat 7.0.41-1 (Ubuntu 12.10)
Tomcat 7.0.41-2 (Ubuntu 12.10)
Trac 1.0.1-0 (Ubuntu 12.10)
Trac 1.1.1-0-dev (Ubuntu 12.10)
Tracks 2.2.1-3 (Ubuntu 12.10)
Tracks 2.2.2-0 (Ubuntu 12.10)
Tracks 2.2.2-1 (Ubuntu 12.10)
Typo 6.1.2-0 (Ubuntu 12.10)
Typo 6.1.3-0 (Ubuntu 12.10)
Typo 6.1.4-0 (Ubuntu 12.10)
Typo 6.1.4-1 (Ubuntu 12.10)
Typo 6.1.4-2 (Ubuntu 12.10)
Typo 6.1.4-3 (Ubuntu 12.10)
Typo 6.1.4-4 (Ubuntu 12.10)
ub_13_4_cpu
Weblate 1.3-2 (Ubuntu 12.10)
WebPack 1.5-0 (Ubuntu 12.10)
WordGento
Wordpress 3.5.1 and OpenSUSE 12.3
WordPress 3.5.1(en) on Nginx with Percona MySQL
WordPress 3.5.1(ja) on Nginx with Percona MySQL
WordPress 3.5.1-0 (Ubuntu 12.10)
WordPress 3.5.1-0-multisite (Ubuntu 12.10)
WordPress 3.5.1-1 (Ubuntu 12.10)
WordPress 3.5.1-1-multisite (Ubuntu 12.10)
WordPress 3.5.1-2 (Ubuntu 12.10)
WordPress 3.5.1-2-multisite (Ubuntu 12.10)
WordPress 3.5.2-0 (Ubuntu 12.10)
WordPress 3.5.2-0-multisite (Ubuntu 12.10)
WordPress 3.5-0 (Ubuntu 12.10)
WordPress 3.5-0-multisite (Ubuntu 12.10)
Wordpress, LAMP on OpenLogic CentOS 6.3
WordPress3.5.1-Handson
WordPress3.5.1ITkaasanLast
WordPress3.5ITkaasan
WordPress3.5ITkaasanLast
wordpress-magentoimag
wpmagento
X2CRM 2.5.2-0 (Ubuntu 12.10)
X2CRM 2.7.2-0 (Ubuntu 12.10)
X2CRM 2.7-0 (Ubuntu 12.10)
X2CRM 2.9-0 (Ubuntu 12.10)
X2CRM 3.0.1-0 (Ubuntu 12.10)
X2CRM 3.0.2-0 (Ubuntu 12.10)
X2CRM 3.1.1-0 (Ubuntu 12.10)
X2CRM 3.1.2-0 (Ubuntu 12.10)
X2CRM 3.1-0 (Ubuntu 12.10)
XOOPS 2.5.5-0 (Ubuntu 12.10)
XOOPS 2.5.6-0 (Ubuntu 12.10)
XOOPS 2.5.6-1 (Ubuntu 12.10)
Zurmo 1.0.20-0 (Ubuntu 12.10)
Zurmo 1.1.0-0 (Ubuntu 12.10)
Zurmo 1.1.20-0 (Ubuntu 12.10)
Zurmo 1.1.31-0 (Ubuntu 12.10)
Zurmo 1.5.12-0 (Ubuntu 12.10)
Zurmo 1.5.13-0 (Ubuntu 12.10)
Zurmo 1.5.14-0 (Ubuntu 12.10)
Zurmo 1.6.0-0 (Ubuntu 12.10)
Zurmo 2.0.0-0 (Ubuntu 12.10)
Zurmo 2.0.1-0 (Ubuntu 12.10)
Zurmo 2.0.11-0 (Ubuntu 12.10)
Zurmo 2.0.2-0 (Ubuntu 12.10)
Zurmo 2.0.4-0 (Ubuntu 12.10)
Zurmo 2.0.5-0 (Ubuntu 12.10)
Zurmo 2.0.6-0 (Ubuntu 12.10)
Zurmo 2.0.7-0 (Ubuntu 12.10)

There are a lot of images for Java development, ruby, django, PHP software etc. The list is so large that you do not need a sysadmin anymore. You can get up to speed within minutes! If you are still not convinced, check out the live version of the list in the azure portal or on this website: http://vmdepot.msopentech.com/List/Index

 

Have fun!

 

kick it on DotNetKicks.comShout it


Should I move to Windows Phone 8?

$
0
0

nokia-lumia-920I have had the HTC S710 a few years back. It had Windows Mobile 6.0 After that phone I got an HTC Diamond 2. It ran Windows Mobile 6.1 and later 6.5. I loved both phones because I work all day on my Windows notebook and had it connected with USB to charge and sync my calendar and contacts with Outlook. It was awesome! But after a while Android kicked in and became very popular in a short time. My favorite phone brand started to release more phones with android OS than with windows OS. So I moved to an HTC Desire with Android 2.x on it. I rooted it and got a custom rom on it to cope with the limited app memory. 

After a while I decided to make a native android app. It is Dutch and not that good, but it was worth the challenge and I learned a lot of it. After the HTC Desire got reboots because of the heating issue, I switched to a HTC Desire C. It was a cheaper phone, but had all the software that I wanted. It runs Android 4.x but the CPU (and RAM) seems limited and made the phone laggy. Even installing Zeam Launcher did not fix it. The HTC rom seems slow. All the eye candy.

Because my previous HTC Desire didn’t handle all the rom changes that well, I decided not to try moving roms again because of the heating issues that may occur. So what is next? A new Android phone like the Samsung Galaxy SII plus? Or perhaps a Windows Phone 8 with wireless charging? The Nokia Lumia 920 had a price drop and Nokia is known for great hardware quality. I have had Nokia’s before; the 5110, 3210, 5210 with swappable covers. The hardware and software never let me down and the battery was great! So why not try Windows Phone 8? I love windows 8 and am looking forward to 8.1. I work all day with Visual Studio 2012 and have 2013 preview installed. I know C# .Net and HTML5, so building apps is no problem. So what can be a problem? Apps (and small OS features)!

So Here is a list with my “can not live without apps”:

 

 

samsung-galaxy-sii-plus

furthermore, I cannot live without proper A2DP support to stream my Spotify music to the radio in my car, but according to http://support.microsoft.com/kb/2770012 Windows Phone 8 does support version 1.2 Can someone verify that it works well with a Sony X-Ploid radio?

So dear reader, what do you advice? A Samsung Galaxy S2 Plus or Nokia Lumia 920 or something else? Both the Samsung as the Nokia support 4G internet.

The Samsung Galaxy S2 Plus with Android 4.x is now 260 euro and the Lumia 920 is 330 euro. The Lumia 520 is just 152 euro’s and is nice to use as test device for application development, because my notebook does not allow the Windows Phone emulator to run. My notebook has no Second Level Address Translation (SLAT) support and cannot run hyper-V. So I need a Windows Phone device to build apps for that platform. So what to do?

 

ps. Here is my phone history: Nokia 5110 –> Nokia 3210 –> Nokia 5210 –> Alcatel 511 –> Motorola T720 –> Sony Ericsson W800 –> HTC S710 –> LG Cookie –> HTC Touch Diamond 2 –> HTC Desire –> HTC Desire C –> Samsung Galaxy SII plus or Nokia Lumia 920??

Raspberry pi with Xbian and NFS

$
0
0

If you do not yet have a solution to watch pictures and movies on your TV, you really should buy a Raspberry Pi. It is around 40 euro and needs an SD card, USB to micro USB and HDMI cable. And last but not least some free Linux distribution with the famous XBMC. I have blogged before about RaspBMC but I have moved to Xbian because there are more developers involved and some are Dutch. You can reference network locations on your small raspberry xbmc to list the movies inside them. There are several solutions to make that reference. One is samba. This works great, but samba has some protocol overhead. NFS is an other option and is more ‘lightweight’. 

image

So download the windows installer for Xbian .  Or check this page for other operating system options. Put it on your SD. put the SD in your pi and power up and make sure it is connected to the LAN.

SSH (with putty for instance) to the pi. I have added the mac address in the router for a static IP. so I know how to connect with “ssh xbian@ipadres-of-pi” the default password is raspberry.

exit the menu and create local directories for the mounting points for your TV shows, movies, pictures and music.

I have made a dir named public on the root. which require root access so I had to sudo it.

xbian@xbian /public $ sudo mkdir Moives
xbian@xbian /public $ sudo mkdir Music
xbian@xbian /public $ sudo mkdir Pictures
xbian@xbian /public $ sudo mkdir TV

Next is to mount the network share and make it a permanent mount. So edit the /etc/fstab as root in your favorite texteditor. I used nano.

 

sudo nano /etc/fstab

 

The format to mount is: ip of network device:/path to share /local path  nfs so for my CH3Snas of conceptronic (which uses funplug) is:

192.168.1.133:/mnt/HD_a2/shared/Movies /public/Movies nfs rsize=8192,wsize=8192,timeo=14,intr 0 0
192.168.1.133:/mnt/HD_a2/shared/Music /public/Music nfs rsize=8192,wsize=8192,timeo=14,intr 0 0
192.168.1.133:/mnt/HD_a2/shared/Pictures /public/Pictures nfs rsize=8192,wsize=8192,timeo=14,intr 0 0
192.168.1.133:/mnt/HD_a2/shared/TV\040Shows /public/TV nfs rsize=8192,wsize=8192,timeo=14,intr 0 0

 

After saving the file and rebooting the pi, it will be mounted. The next step is to configure the XBMC to see that the movies are on the local /public/movies folder.

 

Good luck and have fun with the Raspberry pi and Xbian (and XBMC)

Update Lumia 920 to WP8 GDR2 and Nokia’s Amber

$
0
0

The Nokia Lumia 920 amber update which includes Microsoft's Windows Phone 8 GDR2 update will arrive over the air (OTA). There is a list on the Nokia website where you can see if it is available and if not, what the status is. My phone seems to be from Switzerland. The status on the Nokia website was set to ‘coming soon’, but I am really impatient when it comes to new software, so I downloaded the Nokia Software Updater for retail 3.0.8. Also known as NSU for retail. It is a >100mb .exe file and cannot be found (at the moment) on any official Nokia website. So I took mine from http://jkorondy.com/Lumia920 When you connect your phone and see a firmware which starts with a 3, then it contains GDR2+Amber.

 

nokia update

nokia-update-to-amber

After a reboot and logging in with my Microsoft account (live id) it tells me that there is a backup in the cloud which can be restored.

After another reboot (because of the Dutch language pack) it starts to download my apps from the store. But there are a few invalid apps. (I believe that it might be updates for apps without gdr2) so the apps fail to download and install. The problem (and solution) is described on this Windows Phone 7 tutorial website. So I had to manually uninstall all failing apps. It worked on my phone by going to the store and view the download app list and manually cancel the downloads.

 

Ow forgot to mention what the outcome was of my “Should I move to WP8” blog post. Well, I moved from Android 4.x to WP 8 and have all the required apps. None are missing. All apps have this nice native UI. Really like/recommend it!

Live tiles in Windows Phone 8

$
0
0

There are three build in templates in Windows Phone 8.

  • FlipTile
  • IconicTile
  • CycleTile

 

Flip template

The flip template has an image and when it flips, it has text on it.

Iconic template

The iconic template has an icon and when it has been set to “wide” it has three text lines visible. If you want to only use line two or three, you need to supply an empty string to WideContent1. Otherwise it will not render any text and it will just display a large version of the icon. That took me a while to figure out. As you might have guessed, I used this template at first. But it is limited. When a tile is not set to wide, it only has a title and an icon, which was not enough for me.

 

Cycle template

This requires a lot of images which was not suitable for me.

 

Custom live tile

So I looked for an other option. There was a resource online which created a usercontrol and rendered it as image and set that source image to a FlipTile, but it was not widely used because of the bad performance. The best option there is, and which you have probably already have found, is a writeablebitmap.

 

image

 

So fire up the Package manager console:

  • Go to upper right quick launch (ctrl + q, or what your shortcut is)
  • Type in ‘package’ and hit enter
    image
  • Then type ‘install-package writablebitmapex’ (ps. you can also use nuget)
  • You should also install WP Power Tools from codeplex: https://wptools.codeplex.com/
  • It is recommended to use a FlipTile for your custom tile and just compose a bitmap as background and do not use the flip side.
FlipTileData ftd = GetFlipTd();
Uri u = new Uri("/App.xaml", UriKind.Relative);
try
{
    ShellTile tile = ShellTile.ActiveTiles.Where(t => t.NavigationUri == u).First();
    if (tile != null)
    {
        tile.Delete();
    }
}
catch { }
ShellTile.Create(u, ftd, true);

The GetFlipTd method is the one where the magic happends. (composing the bitmap) This code will get you started:

private FlipTileData GetFlipTd()
{
    WriteableBitmap wbSmall = BitmapFactory.New(159, 159);
    WriteableBitmap wbMedium = BitmapFactory.New(336, 336);
    WriteableBitmap wbLarge = BitmapFactory.New(691, 336);

    wbSmall.Clear(Colors.Green);
    wbMedium.Clear(Colors.Green);
    wbLarge.Clear(Colors.Green);

    TextBlock lbl = new TextBlock();
    lbl.Text = "Nice custom tile";
    lbl.FontSize = 18.0;
    lbl.Foreground = new SolidColorBrush(Color.FromArgb(255, 255, 255, 255));

    WriteableBitmap tBmp = new WriteableBitmap(lbl, null);
    wbSmall.Blit(new Point(19, 19), tBmp, new Rect(0, 0, tBmp.PixelWidth, tBmp.PixelHeight), Colors.White, System.Windows.Media.Imaging.WriteableBitmapExtensions.BlendMode.Alpha);
    wbMedium.Blit(new Point(19, 19), tBmp, new Rect(0, 0, tBmp.PixelWidth, tBmp.PixelHeight), Colors.White, System.Windows.Media.Imaging.WriteableBitmapExtensions.BlendMode.Alpha);
    wbLarge.Blit(new Point(19, 19), tBmp, new Rect(0, 0, tBmp.PixelWidth, tBmp.PixelHeight), Colors.White, System.Windows.Media.Imaging.WriteableBitmapExtensions.BlendMode.Alpha);

    wbSmall.Invalidate();
    wbMedium.Invalidate();
    wbLarge.Invalidate();

    SaveFileToIS("Shared/ShellContent/Small.jpg", wbSmall);
    SaveFileToIS("Shared/ShellContent/Medium.jpg", wbMedium);
    SaveFileToIS("Shared/ShellContent/Large.jpg", wbLarge);

    FlipTileData ftd = new FlipTileData(); // 19 px border
    ftd.BackContent = "";
    ftd.BackTitle = "";
    ftd.Title = "";
    ftd.WideBackContent = "";
    ftd.SmallBackgroundImage = new Uri("isostore:/Shared/ShellContent/Small.jpg"); // 159 x 159
    ftd.BackgroundImage = new Uri("isostore:/Shared/ShellContent/Medium.jpg"); // 336 x 336
    ftd.WideBackgroundImage = new Uri("isostore:/Shared/ShellContent/Large.jpg"); // 691 x 336
    return ftd;
}

The secret is the location where you should store the image. You can debug/view this with the WP Power Tools. When you store the jpg (or png) in an other folder you will get “Argument Exception :uri for Isolated Storage” It was poorly documented, but I have found it here in the answer (2nd part) http://social.msdn.microsoft.com/Forums/wpapps/en-US/9c68b4e7-9863-4bcf-a839-b21fac8cc231/argument-exception-uri-for-isolated-storage

and the specific path was also mentioned here http://stackoverflow.com/a/15589739/169714 

 

If you want a custom tile, it needs to be in /Shared/ShellContent/ !!

 

Good luck!

 

image

kick it on DotNetKicks.comShout it

Firefox and Google Tasks

$
0
0

I have been interested in GTD (getting things done) for a while and have been using the Pomodoro technique for a while now. I am always looking for a good digital solution to manage my to-do lists. I have tried, Evernote, OneNote, ToDoIst, notepad, offline paper, Google keep (which is less mainstream, but does deserves it) and Google tasks. Matt Cutts recently blogged about his version and it made me reconsider my new tab page in Firefox (my main browser). I have the Speeddial add-on to have shortcuts like ALT+1 to go to tweakers.net etc. That gave me pinned sites on the new-tab which was awesome in FF4.0 (which is natively in firefox since version 22 or something). But as Matt points out, it might distract you and a to do list will force you to focus on the things to do. I have found on a blog that this url https://mail.google.com/tasks/canvas gives you your Google tasks full screen. In Firefox you can go to the famous about:config and search for “newtab” and change the url of browser.newtab.url to the previous mentioned tasks/canvas url.

 

image

 

The only downside to this is, that there is no native Google Tasks app for windows phone. http://www.windowsphone.com/nl-nl/store/app/gtasks/a56d575c-7253-e011-854c-00237de2db9e

and there is no way to have the OneNote tasks on the new tab page of Firefox. Perhaps having a blank page is better and opening a to-do list/application separately on the second screen. Let me know your 2cents.

 

Good luck!

Viewing all 132 articles
Browse latest View live