ASP .Net Mobile Device Detection

January 5th, 2015

protected void Page_Load(object sender, EventArgs e)
{
if (Request.Browser.IsMobileDevice)
{
Response.Redirect(~/MobilePages/Default.aspx”);
}
}

Creating and consuming WCF Services

November 14th, 2014

Create a WCF Service Application
Run it, right click on the service and copy the address

Create a custom class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SandCastleServices
{
public class TestClass
{
public int Id;
public string Name;
public List<string> WordList;
}
}

in Service.svc.cs add function
public TestClass GetTestClass()
{
TestClass newClass = new TestClass();
newClass.Id = 3;
newClass.Name = “Test3″;
newClass.WordList = new List<string>();
newClass.WordList.Add(“asdf”);
newClass.WordList.Add(“gjh”);
newClass.WordList.Add(“ety”);

return newClass;
}

in IService.cs add an Operation contract
[OperationContract]
TestClass GetTestClass();

Create a Web Project
Right click on the project and coick on “Add Service Reference”
Paste the address

In the code:
ServiceReference1.Service1Client client = new ServiceReference1.Service1Client();
string test = client.GetData(89);

//This is how you get a custom class
ServiceReference1.TestClass testClass = client.GetTestClass();

How to set an application name in the Tomcat Manager

October 14th, 2014

Web.xml in the WAR should have a tag <display-name>

Using Spring StopWatch to measure performance of your server code

October 14th, 2014

import org.springframework.util.StopWatch;
//Very 1st statement in controller method :

StopWatch stopwatch = new Stopwatch(“some name here”);
stopwatch.start(“snippet 1″);

//code snippet 1 here

stopwatch.stop();

stopwatch.start(“snippet 2″);

//code snippet 2 here

stopwatch.stop();


logger.debug(stopwatch.prettyPrint());

 

How to install additional maps to a Garmin GPS device?

October 13th, 2014

First you need to get the maps. You can buy a preinstalled SD card:

North America Europe

or download the software from the Garmin site and use the following Garmin instructions to load it on your device:

“There are many situations where it may be desirable to install additional mapping to a Garmin GPS. One of the most common programs used to transfer mapping to a device is MapInstall. This software is available for both Windows and Mac OS X, and can be downloaded for free from the Mapping Software page of the Garmin website:  http://www8.garmin.com/support/mappingsw.jsp

Once MapInstall is installed, to load maps:

  1. Connect the Garmin device to the computer
  2. Open the MapInstall program
    • MapInstall appears in the Programs list under Garmin in the Start menu on Windows
    • MapInstall appears in the Applications folder on a Mac
  3. Select the device or SD card
    • If all compatible map products installed on the computer will fit completely on the selected device, MapInstall will give the options to Send Maps (Mac)/Continue (Windows) or Customize
      • Send Maps/Continue will send all the maps that will fit on the device
      • Customize will allow the user to select individual map products
      • Advance/Partial Install will allow the user to select sections of the map products without sending the whole map product
    • If all map products installed on the computer will not fit completely on the selected device, MapInstall will give the option to Continue
      • This will allow the user to select individual map products
      • Advanced/Partial Install will allow the user to select sections of the map products
    • If loading the map to a SD card or an older Garmin device, MapInstall will give the option to Continue
      • MapInstall will allow the user to select sections of the map products – similar to the Advanced/Partial Install option
  4. Click Send Maps (Mac) / Continue (Windows)
  5. Click Confirm (Mac) / Install (Windows)
  6. Click Done (Mac) / Finish (Windows)

When selecting the maps, the storage meter displays how much space the selected mapping requires in relation to the available storage on the device and/or SD card. This meter appears below the map on both Mac and Windows on the map selections screen.

To deselect a map tile in MapInstall:

  • Mac: Click to select / Click again to deselect
  • Windows: Left-click to select / Right-click to deselect

To deselect multiple map tiles at once, hold Ctrl (Windows) or Command (Mac), then click and hold the mouse button and outline all the tiles to be deselected. Release the mouse button to finish the deselect. On Mac computers, deselect all selected maps by clicking Edit in the menu bar and selecting Clear Selection.

After MapInstall has finished loading maps to the device, disconnect the GPS and the mapping will be available for use on the device. If using a Mac, make sure to eject the device first before disconnecting it.”

 

 

Soylent Green is people!

October 12th, 2014

If that’s not a “surprising and previously unknown fact, especially one that is made known in a dramatic way” then I don’t know what is.

Stack’M Donuts

October 11th, 2014

The first game made by April 34th.

Combine similar delicious donuts to create wonderful new flavors with every swipe. This tantalizingly addictive puzzle will have you gripping your device for hours on end! Conceptually inspired by other popular games, Stack’M Donuts will feel familiar yet refreshingly new.

ORIGINAL ARTWORK
Includes original mouthwatering pastry art. If this game doesn’t make you hungry for a sweet treat, you’re not ok.

DELICIOUSLY ADDICTIVE
With every swipe you’ll love Stack’M Donuts that much more. Just remember, you have a family, friends, and responsibilities. As much as we want you to play our game for 24 hours straight, we don’t want to ruin your life. We’re sorry in advance :)

Get it here

If you like donuts, you may also find this interesting, click on the image to find out more


 

April 34th

October 10th, 2014

A fun new company creating apps and more. Check them out at april34th.com

Hello world!

September 5th, 2014

Welcome to Technical Revelations. This is a blog that keeps track of our revelations related to technical problems – software, hardware, code and installation instructions…