Posts

Showing posts from February, 2016

Asp.net: Dynamic Sitemap.xml

This is an article I started to working for the project: rustkickers, which for now I'm putting on hold. What I was trying to do was kill two birds with one stone. If you need a good sitemap to submit to google or to create a "site map" for you users then this would do it. I haven't finished making it but there is where my notes are.

Generating dynamic XML Sitemaps in ASP.NET MVC - Ben Foster
ASP.NET MVC: Get all controllers - Stack Overflow

Resource
http://www.robtennyson.us/post/dynamic-sitemaps-with-aspnet-mvc - Example
http://blog.divergencehosting.com/2009/04/01/dynamic-create-google-sitemap-aspnet/ - Another example
Create a Google Site Map with ASP.NET
ASP.NET MVC: Get all controllers - Stack Overflow
http://msdn.microsoft.com/en-us/library/yy2ykkab(v=vs.100).aspx

Maybe create a atom feed instead of a sitemap.xml?
http://weblogs.asp.net/seanmcalinden/create-rss-and-atom-feeds-using-custom-asp-net-mvc-action-results-and-the-microsoft-syndication-classes

Retrofit Callback instead of Async Handler

For a quick and dirty solution I used an async handler in my activity, to call an api. I sometime need to see things work right for a sanity check, and win whatever small achievement it holds. Whether its just to reassure me I'm on the right path. So below is a quick and simple change but makes all the difference.

@GET("/GetTimes/{id}") public ArrayList<YourObject> GrabData(@Path("id") String id); vs
@GET("/GetTimes/{id}")
void GrabData(@Path("id") String id, Callback<ArrayList<YourObject>> callback);

Resources
using Square's Retrofit networking library
Retrofit.Callback's success() and failure()
If you callback is in a fragment
Receiving custom parameter in retrofit callback

Bootstrap Styled Checkbox with FontAwesome

I was inspired recently when I cam across some quick css that leverage font-awesome for browser specific inputs, which I liked so much I wanted to further but as luck would have it I already found a project that did this. Which added support for the different types of components in bootstrap. I'm still looking for a project does this with the file input style. Regardless if I don't I'm going to make one and adapt it in a project that uses my npm package.

References
http://codepen.io/jamesbarnett/pen/yILjk/
https://github.com/flatlogic/awesome-bootstrap-checkbox

Side note
https://github.com/HourlyNerd/angular-bootstrap-checkbox