Resetting Cursor in Bing Maps – Support IE

August 10, 2015

I was having trouble resetting my Bing Maps implementation cursor back from a cross-hair (used when plotting a pin) to the default grab cursor.

I found that a slightly modified cursor url did the trick:

Old – _map.getRootElement().style.cursor =’url(https://ecn.dev.virtualearth.net/mapcontrol/v7.0/7.0.20150720111303.14/cursors/grabbing.cur) 10 9, move’;

New – _map.getRootElement().style.cursor =’url(https://ecn.dev.virtualearth.net/mapcontrol/v7.0/7.0.20150720111303.14/cursors/grab.cur), move’;


TagIt

April 2, 2015

TagIt! I have officially wrote the beginning of my first jQuery plugin.

I have been working on a much larger application and needed a lightweight tagging plugin for jQuery. I looked around but couldn’t find one that fit my needs. Lightweight, auto-complete, handles key/value pairs. I really wanted something that I could send some auto-complete values to that not only had a value, but a key.

I decided to take the plunge… and I thoroughly enjoyed it. The project is open-source and I hope someone can get some use out of it.
Your feedback is always welcomed.

Check out a demo on my website.


Formatting Javascript Date with Month Name

February 16, 2015

Oh the limitations of javascript… So I needed a way to produce a date/time string that would match the way I format my date/time strings in C# (MMMM dd, yyyy hh:mm:ss tt). As most know, javascript isn’t very nice when it comes to working with dates/times. My project had the added benefit of some special requirements. jQuery could be used, but no plug-ins are allowed.

After doing plenty of searching and posing a question on StackOverflow, I came up with this function. I sure wish the function could be shorter…


function getFormattedDateTime(dateTimeToFormat) {
dateTimeToFormat = new Date(dateTimeToFormat);

var zeroPad = function (val) {
return (val <= 9 ? '0' + val : '' + val);
};

var month = dateTimeToFormat.toLocaleString('en-us', {month: "long"});
var day = dateTimeToFormat.getDate();
var year = dateTimeToFormat.getFullYear();

var hour = ((dateTimeToFormat.getHours() + 11) % 12 + 1);
var minutes = dateTimeToFormat.getMinutes();
var seconds = dateTimeToFormat.getSeconds();
var suffix = (hour <= 12) ? 'AM' : 'PM';

return month + ' ' + zeroPad(day) + ', ' + year + ' ' + zeroPad(hour) + ':' + zeroPad(minutes) + ':' + zeroPad(seconds) + ' ' + suffix;
}

You can play with this function in action on JSFiddle


SSRS Expansion Icon Reversed

November 20, 2014

As I was creating a report in SSRS, I was adding my group fields and upon previewing the report noticed that my expansion icon was reversed.

When the child elements below the header were displayed a plus(+) symbol appeared and when the child elements were hidden a minus(-) symbol was shown.

After spending a lot of time looking at the options for the group fields and text boxes that contain the group fields, I noticed a property called “InitialToggleState”. Once I switched this property to true, the reversed expansion icon started working normally again.


Enable app.debug.config app.release.config

September 15, 2014

Excellent post on how to transform App.config.

build. measure. learn.

For now only web.config supports transformation (web projects).
This transformations allow you can have different settings for different configurations (debug or release). A good example is transformation of a connection string. Probably you will have a different connection string when you release the app in production.

Doing the following steps you can obtain transformation on a app.config too.

1. Prepare your project and add app.config, app.debug.config and app.release.config. Make sure is running under .Net 4.0 .

2. Right click on the project, click Unload project and then Edit .csproj.

3. Below the last PropertyGroup add the following:

4. Modify the section ItemGroup that’s related to app.config/app.*.config files

5.Below the last Import tag insert this one

6.Right before end of Project tag add this

7.Now you can save the project, right click the project and choose Reload Project.

8.For app.debug.config / app.release.config files you can use the template that’s…

View original post 15 more words


Fiddler Only Log Specific Host(s)

September 11, 2014

Fiddler2 can be an amazing web traffic diagnostic tool, but often times it records way too many requests. It will even pop in random web requests from processes running on your machine. This can be solved with the filters option. You can limit the results to a specific host, process, etc. In the screenshot below I detail how to restrict Fiddler2 to only the hostname http://www.google.com.

Capture

1. Make sure to check Use Filters

2. Chose the Show only the following Hosts dropdown option

3. Type in the name of the host you would like to view (ex: http://www.google.com)


AdMob SDK For Windows 8 – Incompatible Assembly Error

September 6, 2014

I was recently working on my Windows Phone 8 App for Fuelizer and I came across the following error when I tried to import the AdMob SDK:

A reference to a higher version or incompatible assembly cannot be added to the project.

error

After spending almost an hour trying to determine what versions were incompatible, the solution was much easier that anticipated. To resolve this issue you simply need to unblock the assembly. The assembly became blocked since it was zipped up. After unblocking the assembly as shown below, I was able to add the reference to GoogleAds.dll successfully.

unblock


Excel Macro to Extract URL from HYPERLINK Formula

August 26, 2014

After searching the internet for a macro to extract the url of a hyperlink I found numerous possibilities, but none worked. After further inspection of my hyperlink, what I needed to do was extract the URL from the HYPERLINK formula, not the Address of a hyperlink. There is a difference. Here I share the code I used to make this happen.

This code will allow you to select several cells with HYPERLINK formulas and then use my macro to replace the formula with just the URL.

Sub ReplaceHyperlinkWithUrl()
Dim s As Object
Dim oldString As String

For Each s In Selection
oldString = s.Formula

Dim startIndex As Long
startIndex = Len(oldString) – 12
oldString = Right(oldString, startIndex)

Dim endIndex As Long
endIndex = InStr(oldString, “”””)
oldString = Left(oldString, endIndex – 1)

s.Formula = oldString
Next s
End Sub


960 Grid Adapted to 1120px

July 28, 2014

I have used the 960 Grid System on a few projects and wanted to include it in the use of a recent work related project. Problem was that I needed to utilize more than 960px of the screen.

The solution? I adapted the 960 16 column grid system to be used as a 1120px 16 column grid system.

The 1120px design scheme allows for each of the 16 columns to be 50px instead of 40px wide, while still keeps the 10px margin on the left and right which creates the 20px gutters.

While this is fairly specific to my needs, it may solve someone else’s problem as well.


Show Hidden Files on MAC

July 23, 2014

In order to show hidden files and folders on a MAC, execute the following command in a terminal window:

defaults write com.apple.finder AppleShowAllFiles TRUE

killall Finder

 

In order to turn it back off, switch the TRUE to FALSE:

 

defaults write com.apple.finder AppleShowAllFiles FALSE

killall Finder