TODO:
Have you ever wondered how to send email when UserManager.SendEmailAsync is called?
SOLUTION:
In the App_Start folder there is file called IdentityConfig.cs
In that file there is a method called publicTask SendAsync(IdentityMessage message).
Add your email code to that method and you will be able to send emails when UserManager.SendEmailAsync is called.
NOTES:
There are no notes on this topic.
TODO:
Have you ever had an empty content editable element, which means the only way to get focus to it was to tab to it?
SOLUTION:
Enclose your element in a <div class="editableCell">. Then track the click on the div, setting focus to it's first child, which will be your empty content editable element. See the JQuery code below.
$(document).on('click', '.editableCell', onClick);
//So we need this because when there is an empty contenteditable element it wont take a click. So we need to get the parent (TD) then set focus to the SPAN which will allow data entry.
function onClick(e) {
$(e.target).children('span')[0].focus();
}
NOTES:
You can change the 'span' to whatever your contenteditable element is. In my case it was a span.
TODO:
Have you ever wanted to get the week of the year by using a a custom first day of the week?
SOLUTION:
var weekOfYear = CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(
DateTime.Now,
CalendarWeekRule.FirstDay,
DayOfWeek.Monday);
NOTES:
This sample will get the week of the year by using the FirstDay of the week set to Monday, rather than the default of Sunday.
Are you considering buying a NordicTrack machine, if so read this carefully. I purchased an Elite Elliptical for $999 about 9 months ago. It started making a thumping sound, so on January 11, 2016 I called NordicTrack. I was on hold for about 30 minutes before I gave up. A couple days later, I called back, and again gave up after 30 minutes on hold. On January 20, 2016 I filled out a support ticket on their site. No response back from them at all. Today, February 4, 2016 I called back and this time waited until I got an agent on the phone. They had no record of my support ticket even though I have a confirmation email from the request. Now I know why the hold times are unacceptable. The agent first had to collect a bunch of information that was already on the account profile page I filled out weeks ago. Next, they had me go to the machine, with a toolbox of tools to begin troubleshooting. Luckily I am an engineer by trade, because I do not see a un-handy person SAFELY doing the things I was asked to do. I was asked to take the cover off of the flywheel to check inside for a unaligned belt. Then I was asked to take another cover off of the inside of the flywheel to look at that side of the wheel. I was then asked to take the top cover off of the wheel case. I spent over 1 hr with this agent "troubleshooting" this device. Incredibly, the issue is coming from a part of the machine that came preassembled.
The machine is a good machine from a functionality standpoint. But the service is TERRIBLE. Long hold times, BS troubleshooting, and as a very last effort they may send a tech. The caveat is they cannot send a technician UNLESS they also order a part. So it appears you better be able to troubleshoot for them, because without a part, there is no service visit.
I would never buy another NordicTrack anything. When we moved I sold my elliptical so that I could buy this one, and in hindsight that was a foolish decision. The service and support are the WORST I have ever seen.
TODO:
Have you ever got the error message "App installation failed: Could not inspect application package" when you try to deploy your swift app to your iPhone?
SOLUTION:
There are many causes but what my issue was was this. I had an info.plist file specified in the "Copy Bundle Resources" section in "Build Phases". Once I removed that, my app installed.
There are also a series of other solutions at this site that may help if you do not have the issue above.
NOTES:
The app would work in the Simulator just not install to the iPhone
TODO:
Have you ever wanted to change the username and password for an Application Pool using C#?
SOLUTION:
using(ServerManager serverManager = new ServerManager())
{
ApplicationPool pool = serverManager.ApplicationPools["AppPoolName"];
pool.ProcessModel.IdentityType = ProcessModelIdentityType.SpecificUser;
pool.ProcessModel.UserName = @"username";
pool.ProcessModel.Password = @"password";
serverManager.CommitChanges();
}
NOTES:
You need to add a reference to Microsoft.Web.Administration dll, located in Windows\System32\inetsrv directory
TODO:
Have you ever wanted a function that tells you if a certain date is a Weekday?
SOLUTION:
CREATE FUNCTION IsWeekday(@InputDate datetime) RETURNS int
AS
BEGIN
DECLARE @isweekday int
select @isweekday=choose(datepart(dw, @InputDate), 0,1,1,1,1,1,0)
RETURN @isweekday
END
NOTES:
There are no notes on this topic
TODO:
When you switch between OSX and VMWare Fusion 7, your windows screen resolution gets reset.
SOLUTION:
1. Open file: /Users/{username}/Library/Preferences/VMware Fusion
2. Add the following 2 lines at the bottom
pref.autoFitGuestToWindow = "FALSE"
pref.autoFitFullScreen = "stretchGuestToHost"
NOTES:
There are no notes on this topic
TODO:
You have a RadGrid and the edit column does not show the edit button, only the "edit" text
SOLUTION:
In my case the following was in my web.config,
<add key="Telerik.EnableEmbeddedSkins" value="false"/>
so the solution was as follows.
- Add EnableEmbeddedSkins="true" to your RadGrid declaration
- Add Skin="" to your RadGrid declaration
NOTES:
TODO:
Have you ever wanted to validate a page on the client side?
SOLUTION:
if (Page_ClientValidate("vgForgotPassword")) {
//do something
}
NOTES:
If the validation group does not have a name use ""