All posts by shadowcouncils

Cortana demo work-a-rounds – C#

keywords: cortana windows 8 windows 8.1 windows 9 windows 8.1 phone speech work-around emulator problem
There was a problem starting in-app speech recognition. The details are provided below.
You will need to accept the speech privacy policy

Startup VS as Admin, then :
Hit_WIndows_Key

 

scroll_Right

settings

speech

Check

 

 

Null reference exception, added null handling in:
MainPage.xaml.cs : private async void InitializeRecognizer()

case AsyncStatus.Error:
//Added null handling.
if (operation != null && operation.ErrorCode != null)
{
hResult = operation.ErrorCode.HResult;
message = operation.ErrorCode.Message;
}
MessageBox.Show(String.Format(
AppResources.SpeechRecognitionErrorTemplate,
hResult,
message));

Sources:
http://msdn.microsoft.com/en-us/magazine/jj721592.aspx

Share on Facebook

Initial setup for A line of Code’s Augmented Living on Laptop

You may not need all this, but this is how we will be setting up the new laptop’s for demo.

Kinect, Mount and Leap are all very inexpensive so any route should be fine.

device4

First_Look_ALOCLaptopDark

Share on Facebook

All 4 unsupported Leap DLL’s. .Net 4.5 x86/4.5 x64 – 4.5.1×86/4.5.1×64 – Version -1.0.9.8391 – C#

Until leap is supporting dll’s past 4.0  I’ll be putting out rebuilds of the SDK.

All DLL’s should be located here now.

Share on Facebook

Updated Console Leap Mouse with Leap 4.5.1 DLL C#

This is an updated version of the codeproject project by Meshack Musundi found here : (ConsoleLeapMouse) http://www.codeproject.com/Articles/550336/Leap-Motion-Move-Cursor

Updated version of code with my .net 4.5.1dll’s

Share on Facebook

New DLL Leap 4.5.1 for 1.0.9.8391

https://onedrive.live.com/redir?resid=1C0A3085568F1B39%21142

Point to this instead of 3.5  or  4.0

Enjoy!

Share on Facebook

How to delay an action or keep on a timed loop C#

Key phrases: Repeating code on delay, pause without thread sleep, delaying code

c#

Usage: var dir = Directory.GetCurrentDirectory();

var file = SoundByName(sound);

var actual = Path.Combine(dir, file);

SoundPlayer player = new SoundPlayer(actual);

player.Play();

if (milliseconds > 0) { DelayFactory.DelayAction(milliseconds, () => player.Stop()); }

DelayFactory.DelayActionRepeat(milliseconds, () => player.Stop());

Code:
namespace ALineOfCode.Community.AugmentedLibraries.Common.Factory
{
public static class DelayFactory
{
public static void DelayAction(int millisecond, Action action)
{
var timer = new DispatcherTimer();
timer.Tick += delegate
{
DispatcherHelper.CheckBeginInvokeOnUI(async () =>
{
action.Invoke();
timer.Stop();
});
};
timer.Interval = TimeSpan.FromMilliseconds(millisecond);
timer.Start();
}

public static void DelayActionRepeat(int millisecond, Action action)
{
var timer = new DispatcherTimer();
timer.Tick += delegate
{
DispatcherHelper.CheckBeginInvokeOnUI(async () =>
{
action.Invoke();
});
};
timer.Interval = TimeSpan.FromMilliseconds(millisecond);
timer.Start();
}
}
}

Share on Facebook

AL Alerting by Mail/Phone

Share on Facebook

Patient Dashboard for Augmented living.

This is a centralized collection point for staff to know if someone needs assistance and uses the AL software.

patient_Dashboard

In a mobile browser

dashboard_mobile

Share on Facebook

Learn Some basic CSS in 5 minutes –

Sitting on your butt today because of the snow? Learn some basic web code? Take 5 minutes out to understand CSS Classes.

Go to http://jsfiddle.net/ and get a basic understanding for lined CSS (Style sheets).

Below is an example on how to manipulate a web page through styles one in line and one from a Cascading Stylesheet CSS file. See how you can change these and post your picture. (For more properties other than color)

In top left HTML :

<h1 class=”h2-red”>Hi</h1>
<h1 style=”color: green;”>Hi Green</h1>
In top Right CSS
.h2-red
{
color: red;
text-align: center;
}

Note Align can have many

left Left-aligns the heading
right Right-aligns the heading
center Center-aligns the heading
justify The heading is justified to both margins

Try playing around with the code in the .h2-red and the HTML. Post your results.
jsfiddle

Share on Facebook

MVC 5 Crashes on Debug, with the failed DLL :Web App C#

keywords: Internet Explorer IE devenv devenv.exe crash mvc 5 freezes
There are a few fixes out there that didn’t work for me.

I deleted the IISEXPRESS Folder and added _CSRUN_DISABLE_WORKAROUNDS to system environmental variables rebooted etc. No luck (though this has worked for others).

What I had to do to fix: Open Visual Studio in /safemode as administrator. Then add the ASP.NET Web Project to the solution in Visual studio.

Worked first time.  Could be an add-on.

Share on Facebook