Most Popular Posts

Mar 20, 2016

How to Reset a Comcast Cable Box

Disclaimer: Do the following procedure at your own risk. I'm not a Comcast insider. I'm just good at debugging.

Symptoms

Your cable box has lost signal without being able to recover. Comcast’s customer support has sent a reset signal, but the box is not responding to it.

Problem

What I believe has happened is the box has lost trust in Comcast. Now it refuses to accept any signal from the remote port including a reset signal.

Solution

The solution that has worked for me is to deactivate the box, and then to reactivate it.

Procedure

1. Reset/deactivate the cable box:

  • Press and hold "0" on the remote control for about 5 seconds until the diagnostics menu comes up.
  • Quickly press "1", "3", "7", "9". This will reset/deactivate the box.

2. Wait until any visual activity stops. Reboot the cable box.

3. Verify the box appears as "not activated":

  • Press and hold "0" on the remote control for about 5 seconds until the diagnostics menu comes up.
  • Switch to the item that looks like "DTA status" and click on it.
  • You should see something like "Activated: No".

4. Call Comcast (or do it over an online chat - it's much faster) to ACTIVATE your box. You'll need the serial number of the box which is printed on a label on the bottom of the box.

Within a couple of minutes, TV signal should come in.

Mar 17, 2016

Systems of Linear Equations - Free for All

Some of my friends are familiar with the Windows Store app I wrote a couple of years ago that teaches kids how to solve systems of linear equations. The app generates problems with up to 5 unknowns, describes full step-by-step solutions, or shows just answers.

The news is that I've ditched the Windows Store, and I've made the app freely available as a web service. It is available for all smart devices from all geographical regions:


The app is designed for small form factor devices. So please try it from your phone.

This was made possible by the free web hosting at GitHub Pages.

Jun 2, 2015

Introducing Java Async I/O

I’ve been playing with Java recently. It turns out Java has two archaic I/O stacks neither of which is adequate for modern days. That’s why I developed an async I/O package.

My package doesn’t replace the existing I/O stacks. It’s an upgrade on top of the old InputStream and OutputStream that enables async interaction to optimize CPU usage and responsiveness of the consuming app.

The entire source code is available on GitHub:

https://github.com/zlatko-michailov/async-io

Start with the README file, and you’ll find links to the binaries as well as to the documentation. Go through the doc articles and the API reference, and if this paradigm makes sense to you, try it in an app. I’ll be glad to hear your feedback.

Apr 13, 2015

Nuances of Command Piping in the Windows Command Shell

 

A key concept in command piping is the success/failure of the execution which is determined by the status code the command returns. 0 (zero) means “success” while any other value means “failure”.

Throughout this article, I’ll be using this successful command:

> cmd /c “exit 0

as well as this failing command:

> cmd /c “exit 42

Note: If you want to copy and paste some of these examples, make sure you fix the quotes, dashes, and other characters to their standard ASCII representations.

Execute on Failure ( || )

Executes the command on the right side if and only if the command on the left side has failed. This piped statement:

> cmd /c “echo left & exit 0 || echo right

prints “left” while this piped statement:

> cmd /c “echo left & exit 42 || echo right

prints “left” then “right”.

You can remember this syntax and behavior as the logical OR operation from the C language or its derivates – C++, Java, C#, etc.

Execute on Success ( && )

Executes the command on the right side if and only if the command on the left side has succeeded. This piped statement:

> cmd /c “echo left & exit 0 && echo right

prints “left” then “right” while this piped statement:

> cmd /c “echo left & exit 42 && echo right

prints only “left”.

Similarly to the previous one, you can remember this syntax and behavior as the logical AND operation from the C language family.

Execute in Parallel ( | )

You may be familiar with this one – this is the true pipe. The shell connects the stdout of the left command to the stdin of the right command.

What you may have not paid attention to is that the shell launches both of them in parallel. That is necessary for the pipe to have a live process on each end.

To demonstrate the parallelism, we’ll need to enhance/complicate our left command a little bit:

cmd /c "echo left begin >&2 & timeout /t 5 & echo left end >&2 & exit 0"

First it prints “left begin” (to stderr to avoid the piping, so we can see the output), then it sleeps for 5 seconds to simulate work, and then it prints “left end” right before exiting.

Success and failure don’t matter. Both of these piped statements:

> cmd /c "echo left begin >&2 & timeout /t 5 & echo left end >&2 & exit 0" | echo right

and

> cmd /c "echo left begin >&2 & timeout /t 5 & echo left end >&2 & exit 42" | echo right

print “left begin” and “right”, then sleep for 5 seconds, and then it prints “left end”.

Execute Sequentially ( & )

This is the simplest yet least popular of all variations – it executed the right command after the left command has finished regardless of success/failure.

Using the same commands from the previous section:

> cmd /c "echo left begin >&2 & timeout /t 5 & echo left end >&2 & exit 0" & echo right

and

> cmd /c "echo left begin >&2 & timeout /t 5 & echo left end >&2 & exit 42" & echo right

both of them print “left begin”, sleep for 5 seconds, then print “left end” and “right”.

Relationship to POSIX

The first 3 syntaxes are identical between Windows cmd and bash. What is ‘&’ in Windows is ‘;’ (semicolon) in bash. Otherwise the behavior is the same.

Feb 26, 2015

My US Patents

The following patent applications have been approved in the United States. To find out more about each of them, click on the patent number:

7,818,311 (2010-10-19)
Complex regular expression construction

8,856,792 (2014-10-07)
Cancelable and faultable dataflow nodes

8,909,863 (2014-12-09)
Cache for storage and/or retrieval of application information

About Me @ Microsoft (part III continued)

After multiple reorgs, my team continues owning the programmability and public API for SharePoint and now of the entire Office.

I, personally, have been focused on implementing Office cloud functionality to public app developers through the Office365 and Azure clouds:

I remain the primary reviewer and approver of public API changes in SharePoint.

Dec 20, 2014

Introducing OneSql Client ADO.NET 0.1 (alpha)

I’ve made two releases this week. The important one is OneSql.Client.AdoNet 0.1 (alpha). That is an ADO.NET adapter on top of OneSql.Client. There are a few important things to keep in mind when you try to adopt it:

Dependencies

The OneSql.Client.AdoNet package needs these two other packages:

Supported API

Unless you stick exclusively to -Async methods, you are likely to get a NotSupportedExecption. There are two messages – one for each of the reasons:

  • Synchronous operations are not supported.
    This message means that this call may require a roundtrip to the server which cannot be done synchronously. If there is an –Async version of this method, use that. Otherwise, try to find a workaround that doesn’t utilize this method.
  • This feature is not supported.
    This message means that OneSql Client hasn’t implemented the necessary part of the TDS protocol to enable this feature. You may search this blog to find out what is supported and what is not. For this kind of exceptions, you should be able to find a workaround.
    If you feel strongly about a missing feature, feel free to send me an email at zlatko+onesql@michailov.org. That doesn’t mean I’ll agree to implement it right away, but if I hear from a good number of people, I may do so.
Entity Framework

Enabling Entity Framework is the ultimate test for an ADO.NET provider. I will really appreciate your effort to migrate an EF-based app to Windows Store/Phone using OneSql Client ADO.NET. I’m sure you’ll get NotSupportedException’s please send me those call stacks. I’ll truly appreciate that.

 

The second release is an update on OneSql Client itself. It contains 2 bug fixes plus retargeting both Windows Store and Windows Phone. I expect more such updates as testing on the ADO.NET adapter continues.

I’ll continue posting notifications about new releases on https://twitter.com/OneSql. Follow it if you want to stay informed.