Showing posts from June, 2014

Ng-repeat: Order a List Vertically rather Horizontal

    I don't think I need to explain the setup here since the title explains it all and if not there are similar questions I found that can explain the question for me (in the resource).

The Solution 
Example, I didn't write this example but I did think of one way to improve upon  it. If we have already defined the styles as classes we can than use the $odd or $even in ng-repeat. Since $odd or $even are Boolean we can use either one with a inline if statement and give the <li> tag a class based on it. I haven't tested this but I'm sure it will work, what I actually am curious about is that in the example the definition of odd and even since ng-repeat also have these variables. I wonder if they would ever have a conflict? As a side note for myself note that the example isn't in a un-order list but rather a div. That could another possibly reason behind my issue below.

A Possible Alternative Solution
column-count - CSS | MDN - Example

Problems I Faced
     I believe…

Penguins Rising: Possible Multiplayer

    With my first attempt, I started to look at what Google Game Services to see what it had to offer for real time multiplayer but quickly found my answer in the documentation. Game Service "Real-time multiplayer is currently only supported for the Android platform." So I looked at Google Hangout as an option. The example I found helped me test out this theory and proved that creating multiplayer mode would be possible. However there was minor issues with latency as the example code shows and also ways to handle it. I didn't publish any code on github since there is a lot more for me to do and this year my plans are to start working more on my other games. For now its just important to make note of it so that I can pick up on it later...

sendMessageApp.xml - google-plus-hangout-samples - It's sample code... for Google+ Hangout Apps

Orchard 1.8 Multiple Blogs with Different Workflows

    So you want to have multiple blogs and on top of it all you need to create a different work follow for each blog? One example that I have is a process that I created which allows for two types of workflows. The first is where users are monitored by a manager and the second is one without. In my particularly case the two types of blogs even had a control group that had access to both.
    The first problem I saw in my case was with permission since some of our permissions are global where the blog modifier has access over multiple blogs and users that don't should only be aware of their particular blog. By default Orchard's blog content type is a container in which it is a single type allowing child's of that type but this does not allow use to configure children's permissions.
     So here's what I did create the two blogs as custom content types where they act much like a blog post and really we don't need them for more than that being in my case of cours…

Google App Engine - Bundling and Minification

    I love the Bundling and Minification feature in MVC (4.0+) but sadly I couldn't find a similar process in Google App Engine. So I went looking to create it, but there was a few work arounds I had in place. For example for my styles I simply used Less.js but for my javascript I would have to either pass them through a minifier.    In order to create the best web application on Google App Engine you need to be able to bundle and minify your resources. Last week I looked at externally improve this speed of the game "Penguins Rising" which is hosted on Google App Engine. This externally services was PageSpeed Insights and managed under Google's Webmaster Tools. Which is a little confusing of where I need to go or use for my Application since Webmaster tools is separate from Google API Console.
Research for a Python SolutionApproaches to minify js and css in grails applications - Stack OverflowPython script for minifying CSS? - Stack OverflowIn Python, how can …

Seo Stuff for My Blog

    I've added some new features to my blog but most of it has probably gone unnoticed with what can directly be seen. So this is what I've done, first corrected any 404's and fixing broken indexed pages.  Replaced images with more compress versions and combined styles as well as scripts.  The other stuff I did is a little harder to document since it was varies based on what tools I was looking at but overall I simply just made my blog better for indexing or displaying in search results.

Webmaster Tools: 404 Redirection - YouTube
DMOZ - the Open Directory Project
Yahoo Directory Listings
Google Product Forums
Google Authorship Photo Snippet in Search Results Not Author Dependent
Developer's Guide: Protocol - Blogger — Google Developers
How to Add a Google Sitemap to your Blogger (Blogspot) Blog
What are sitemaps? - Webmaster Tools Help

Index status - Webmaster Tools Help
Search Engine Optimization (SEO) Tools |
PageRank Checker - Instantly Check …

NPOI Does Not Support CSV

    I've been using NPOI for sometime now and was recently asked to create a process to output some data in a csv for better support. I was hoping to bring NPOI in the mix but I had to ask myself does NPOI support CSV/TSV?, simply put no.


Library Version - Reading/Writing
Project Version - Server/Storage Features included.

And... There just doing it my way. Personally speaking I didn't like jumping into FileHelpers, I felt was much more overhead than what I need so I looked at creating a small snippet of code for myself. Unlike with NPOI, I also didn't like from what I could see was examples that needed a model to be passed in. Either way, I will try to post an update when I have finished that piece of the puzzle.

Returning in the middle of a using block - A question for the code examples I - Response Content type as CSV
Back to Basics - Keep it Simple and Develop Yo…

Unity: Notes for My Next Game

    The reason I wrote this article was to create myself a mission of tasks to complete. A lot goes into a game and I already know that I need to narrow down my scope for this game. Especially if I want to have something really show in the next couple of months. So here is my focus...

Create landscape (slope, sky, borders)Make it so I can't fall off, it's annoying.Landscape Texture keeps scretching.First person view single player.Detect collision with falling objectsDestroy player for nowRepeat falling objectsspawn multiple randomly.Create a timer for when a new object spawns.Resources for Landscape Task
Unity - Manual: How do I Make a Skybox?
Unity - Manual: Lightmapping Quickstart
How do I make a sky using skybox?
How to make a texture tile and not stretch
High quality skybox / space

Resources for Player
What is the best free 3D modeling program to use alongside with Unity?
Unity - Scripting API: MonoBehaviour.OnControllerColliderHit(ControllerColliderHit)
Unity - Scripting AP…

Google App Engine Automating Code Pushes

    I was working on this idea for Penguins Rising when Google App Engine was relatively new so this solution didn't come until later in my research. Either way it good to spread the word and get an understand with what I attempted.

Google Cloud Platform Blog: Using GitHub for Push-to-Deploy

I have yet to created a process that takes advantage of the continuous integration in penguins Rising since most of my code is built in javascript is would be nice to have a bridge between phantomjs and Travis CI. Not sure how it would work since Google app engine would the notice for code pushes at the same time when I check in and Travis would have to tell G.A.E that the code cleared.

Uploading, Downloading, and Managing a Python App - Python
Python — Google Developers
Webhooks | GitHub API
Local Unit Testing for Python - Python - This showed the most promise.

HTML5 Game Asset Manager and Loading Screen

     Its important initialize a game if and when it is ready. I probably spent probably about two weeks looking for examples of this idea.One thing I was hope to get from this process was a way accurately update the loading and give the user a percent of when the game has loaded.For accurately updated the loading bar the best I have come up with is to have counter based on the number of assets and after each assets is loaded update the bar. The following setup is for the start button to change when the assets are loaded.

    Follow code is taken directly from the example on HTML5 Rocks but I collected it into a single script and it proved to be very useful. I was working on some logic to queue not only images but sounds because more often than not audio files are larger than image files. Keep in mind though there is not a universal format that is supported like images.


Ng-grid: Sorting Ascending and Descending with Font-Awesome

    I wrote this little snippet for some requirements a while back but since it's so general and if it helps the project to have a quick template to grab it I think it would be much greater to share. Also I was just wanted to write out the documentation as I was learning Angularjs along with ng-grid for the first time during the time I wrote it. So it should be clear that the dependencies are Font-awesomeNg-grid and Angularjs for this snippet.

When I wrote this when I was using Angularjs v1.2.16 stable, font-awesome v4.1.0 both it should not be a problem moving forward but with Ng-grid I used v2.7. It may break with later version as I know a lot has or will change in the template. This snippet should work in all browser but I only tested for Chrome, FireFox, IE8 and greater.

My Code
$templateCache.put("headerCellTemplate.html", "<div class=\"ngHeaderSortColumn {{col.headerClass}}\" ng-style=\"{'cursor': col.cursor}\" ng-class=\&q…