This guide assumes:
- Visual Studio 2010 Professional
- XNA Game Studio 4.0
- Users will be Windows
This article is the first of two on how to package your XNA game into an installer for Windows environments. The first is the easier but less customizable option of using Visual Studio’s built in ClickOnce installer. ClickOnce is essentially a hand-holding tool to package up prerequisites, dependencies, manifests, and content. Additionally, it allows you to specify locations from which the users will install the package (CD, Web, Shared Drive). More conveniently, ClickOnce allows you to specify where the application should check for updates in order to automatically update the content when new versions of the application are released. For example, you could specify a URL that the application will use to check for new versions. If a new version is detected, you can specify either the same URL or a different URL to use for downloading the new content.
While ClickOnce is easy to use, it is not perfect for every scenario and can fail quite spectacularly. I have personally run into situations where users could not install updates to the application because of cryptic errors that were only resolved by completely recreating a user account in Windows (I kid you not, this is a Microsoft-sanctioned approach). Many of the errors are difficult to diagnose and the documentation does not help much when it comes to the more advanced features of ClickOnce. It is definitely convenient, but do not use it if you want customization or extendability.… Continue reading
Exchange Server 2007 and 2010 offer web services that can be accessed via standard SOAP messages. This post will hopefully help you in consuming a very specific web service operation (free/busy data) from your Java environment. I expect that you can take the information found in this post and extend it to other operations. Please note that I will not discuss how to setup Exchange Web Services and will instead assume that such a service is already operational and online.
I cannot guarantee that this is the best, fastest, or most efficient way to get this working. These are the steps that I have compiled through self-teaching, reading various Microsoft documentation, and sifting through a large amount of blogs on separate issues that collectively guided me to the solution. Unlike most of the guides I found, this post should take you from the beginning of the coding process all the way to the end.
The first step is to obtain the WSDL and XSD files that describe the Exchange Web Services. These are usually hosted in the same location as the actual ASMX web service. I only have experience with the setup I use at my company, so results my differ for your Exchange setup.
- Download Services.wsdl to local folder from URL to Exchange Web Service (ie. https://webmail.company.com/ews/Services.wsdl)
- Download messages.xsd to local folder from URL to Exchange Web Service (ie. https://webmail.company.com/ews/messages.xsd)
- Download types.xsd to local folder from URL to Exchange Web Service (ie. https://webmail.company.com/ews/types.xsd)
Microsoft likes to make things complicated and this is true with the files we just downloaded.… Continue reading
In the previous couple of posts, I described some short techniques to accomplishing a simple media server using your legally purchased Blu-Ray and DVD movies. If you are anything like me, you will most likely start getting confused when you look at MakeMKV and Handbrakes more advanced features such as which video/audio codecs to use. You may even run into some crazy streaming playback anomalies regarding TrueHD 7.1 and PGS subtitles like I did. Well, I do not have all the answers for you, but I can at least give you a little bit of information and allow you to take solace in the fact that someone else out there is experiencing similar problems!
Please note that these lists of containers and codecs is not comprehensive. I have chosen commonly found files and formats for convenience and brevity.
Media Container Formats
A lot of people get confused about the differences between all the slang, acronyms, terminologies, and file formats that get tossed around on forums and blogs. Trust me, I know that it can be confusing when someone says something like, “Oh, it’s easy, just create a .mkv, and encode the video with x.264 and the audio in AC-3.” If you have no prior knowledge of these terms, you will be more than a little bit confused.
The bottom line is that there are four common components to movie media files: containers, video tracks, audio tracks, and subtitle tracks. Containers do exactly what you would guess: they contain the rest of the content.… Continue reading
- BD-ROM / DVD-ROM
- Large Hard Drive (mine is 2 TB)
Media is increasingly migrating towards streaming-only distribution. Discs, even BD/HD-DVD formats, have rather low limits on the amount of data that can be stored on each. These low limits and the increasing availability of high-speed and high-bandwidth internet connections are just two reasons that consumers have begun to rely on streaming digital content including movies, music, videos, and pictures. The convenience of streaming services like Netflix and Hulu allow consumers to avoid commercials and watch what they want and when they want. Products like DVR and TiVo are only band-aids on top of the real problem: cable companies disallowing customers to choose their own content at convenient times.
Just think about what you have to do in order to watch your DVDs and Blu-Rays. I have Blu-Rays in my possession that literally take 5 minutes just to load the main menu. This problem is magnified by useless services like BD-Live that require internet connectivity in order to load content like chat rooms and trailers that users may never even use. For users like me, I want to be able to access my content immediately and in the format of my choosing. The current implementation of HD media inconveniences consumers by disallowing various viewing options and restricting Blu-Rays to only existing on the original disc.… Continue reading
- Receiver (optional)
Ideally your setup will look something like: PC (media server) –> Switch –> PS3 –> Receiver (optional) –> TV. The advantages of including a receiver between the PS3 and the TV include better speakers and the ability to decode some of the newer proprietary audio codecs such as DTS-HD and TrueHD (more on that in a different post.)
Follow these steps:
- Use the link above to obtain and install PS3 Media Server on the PC you’re using as your media server.
- Turn on your PS3.
- Start up PS3 Media Server and wait for it to scan the network for available renderers. When it’s done, you should see your PS3 in the “Detected media renderers” section. You can confirm connections or view any errors in the “Traces” tab.
- Under the “Navigation/Share Settings” tab, add any folders you want to share with your media renderers under the “Shared folders” section.
- On the PS3 menu, go to the appropriate section that you want to stream under (Pictures, Music, or Video), find the PS3 Media Server, and navigate to the content you want to stream.
- When you start streaming, PS3 Media Server will display information about what it is currently streaming, the buffer status, and the bitrate under the “Status” tab.
Quite honestly, this is all that needed to be done to get content streaming properly to my TV. In a separate post, I’ll talk about some of the more advanced options of PS3 Media Server, transcoding, video/audio codecs, subtitles, ripping Blu-Rays/DVDs, and lessons learned for the best streaming performance.… Continue reading
Here is a link to the article I wrote on Medical Simulation in Wikipedia about a year ago: http://en.wikipedia.org/wiki/Medical_simulation… Continue reading
You may have noticed that this post is about two months late. Time flies, doesn’t it? The previous post on an introduction to web services and how they work with ASP.NET provided you with a cursory glance. This post will provide you will how to implement a very basic web service both on the server side for consumption and the client side for use in an application.
- Visual Studio 2005 or 2008
- Basic knowledge of C#
- Basic knowledge of ASP.NET Web Services
Step 1 – Create the ASP.NET Web Service
- Visual Studio –> File –> New –> Project… –> Visual C# –> Web –> ASP.NET Web Service Application
Once the web service application project is created, notice that a templated web service was also created (Service1.asmx). The only section of this template to be worried about at the moment is the HelloWorld method marked with the [WebMethod] attribute. Marking methods as a [WebMethod] identifies that they will be used by an external caller through XML SOAP communication and are required to be exposed by the web service WSDL described in the previous post.
- Make sure the HelloWorld method looks exactly like below.
public String HelloWorld()
return "Hello World";
- That is literally all it takes to expose a web service method to the world! Press F5 to begin debugging this application in a local web server and continue to Step 2.
… Continue reading
NOTE: Microsoft no longer suggests using this method of web services, but it is useful knowledge if you are supporting legacy systems or are still required to implement these features for business purposes. This method of web service is still useful for internal operations that do not require high security.
Below is an overview image of common web service architectures. It’s easiest to think of web services at “web methods” contained within a “web library” that contains methods to be executed on a server. The strength of this approach is that all communication is done in a standard XML format, regardless of the platforms communicating. This allows for brand new systems to communicate with extremely legacy systems, assuming that each system can properly implement a valid SOAP request and response according to the WSDL contract.
Client: Any application that requires consumption of whatever methods the web service is exposing.
Web Server: A process that hosts the web services for consumption.
Broker: Provides the definition of the web services being exposed.
SOAP: XML formatted request and results containing data according to the WSDL (see below.)
WSDL: Definition language describing which method to execute, what parameters the method requires, what data types the parameters are, what results will be returned from the web service, and what data type to expect back from the web service.
A common SOAP request with a body but no header. Note that the method being executed is defined in the <m:GetStockPrice> tag and the parameters passed are described in the <m:StockName> tag.… Continue reading
I started out in professional web development by using ASP.NET, so I was spoiled by the fact that Microsoft offers a SqlConnection class to use for various database related connectivity features. When I started with PHP, I decided to do some research and write a similar (albeit, much simpler) Connection class. Keep in mind that this class example only supports MySQL.
I started by defining some members of this class and came up with six useful members.
- Database connection object returned from mysql_connect
- Boolean to determine if the connection is currently open or closed
- Database server host name
- Database catalog name
- Database user
- Database password
public $dbConnection = null;
public $isConnectionActive = false;
private $dbServer = null;
private $dbCatalog = null;
private $dbUser = null;
private $dbPassword = null;
In order to use this class, we need to add a constructor. I began by creating a default constructor that simply initializes values of the member properties. Take notice that not all of the properties are initialized by the default constructor. $dbConnection is not initialized until the Open() method is called and $isConnectionAlive is already false by default.
public function Connection($server, $database, $username, $password)
$this->dbServer = $server;
$this->dbCatalog = $database;
$this->dbUser = $username;
$this->dbPassword = $password;
Now that the class can be instantiated, we need to add methods to allow operations.… Continue reading
If you’re used to classes with C#, C++, and Java, then you’re used to classes in PHP as well. If you’re brand new to classes, I suggest you read up on the definition and uses of them before trying to implement them via this tiny tutorial.
To begin, let’s create a simple class that will store information about a logged in user from a session. This class should hold the user’s username, first name, and last name to identify who it is on subsequent pages and requests. Begin by naming this class as “UserPassport” and adding the three previously described properties. They should not have default values because the class does not make sense without properties assigned during construction.
Expanding on this class, we need to add a constructor and a method to use these properties in a semi-meaningful manner.
public function UserPassport($uName, $fName, $lName)
$this->userName = $uName;
$this->firstName = $fName;
$this->lastName = $lName;
public function displayInfo()
$userInfo = array($this->userName, $this->firstName, $this->lastName);
echo implode(', ', $userInfo);
There’s nothing crazy going on in the constructor.… Continue reading