Posts

Updating MVC4 to MVC5

 In my last article on MVC, I updated Razor 2.0 to 3.0 and showed the difficulties of updating the Razor nuget package in a MVC application. This article picks up from there and since Razor 3.0 is dependent on MVC5 I can assume you have updated Razor already. Typical errors you will see.. Method not found: 'System.Web.WebPages.IDisplayMode System.Web.Mvc.ControllerContext.get_DisplayMode()'. Description:  An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details:  System.MissingMethodException: Method not found: 'System.Web.WebPages.IDisplayMode System.Web.Mvc.ControllerContext.get_DisplayMode()'. Updating the  System.Web.WebPages to version 3.0 fixed this issue. However you may see more packages issues like it. What you can do is try reinstall each package that appears to be broken like so.. Update-Package –reins

Project: DuckSauce Notes

What is Ducksauce     Ducksauce is a small pet project I am working on to make everyday work easier with css and javascript cleanups. The hope is to automate those cleanups in controllable way I see fit, and to also make my code more scalable with third party libraries. Mission Listen to CSS changes and separate them into a .less file. Features  (Just for starters focusing on css cleanups) Console system to attach files/directories. Listen to CSS files Remove changes and separate into a less file. Compile new less files with Unmodified Third party styles (Overridering the css results) Log changes. Refresh page to see the changes? I would like this but it might get annoying. Day 1 Challenges: Listening to file, watch changes, find what those changes are. filesystems - Node.JS: How does "fs.watchFile" work? - Stack Overflow Node.js: Event Emitters and Listeners | Scribblings Accessing the File System in Node.js Observe file changes with node.js - Stack Ov

Bootstrap Typeahead/Autocomplete

    This UI feature goes by many names and whatever you call it is currently no included in the bootstrap project as of 3.1.1 but that might change in later versions. No all hope is lost, actually had found multiple alternatives to import this feature with no dependencies! My biggest concern I had at the start of my research for this feature was that I would have to include Jquery UI which as Autocomplete. Not that there is anything wrong with Jquery UI but I try to avoid adding too many third party styles into my applications. I also try to leverage the css files that I do have as much as possible. So below is two solutions that I am very comfortable with using and strongly suggest. Typeahead/Autocomplete Projects https://github.com/twitter/typeahead.js/ https://github.com/devbridge/jQuery-Autocomplete  -  Another approach which I have used. Resources jquery - Where is the typeahead javascript module in bootstrap 3 RC 1? - Stack Overflow Install typeahead in Bootstrap 3, fix

Npm Install Error - Invalid Package.json

    I felt pretty silly for this error I was seeing on one of my project , but lucky for me nothing a good night's sleep couldn't fix. I'm a nite programmer but that sometimes takes it's toll. The first problem was the fact I put an 's' on my file name. It should be "package.json" not "packages.json" which I carelessly did but the second for this error was actually one I think many people run into. Which is syntax, I found my mistake pretty quickly but you could always use online tools to validate your json file or use the pacakge-json-validator package . // package.json file {   "name": "ducksauce",   "description": "Web Application Tool",   "dependencies" : {     "open" : "*" ,  <-- Here is the problem!   },   "version" : "0.1.0",   "author" : "Anthony Fassett <XXXXXX@gmail.com>",   "keywords" : [  

Nuget Packages You May Not want to use

    This is just a thought and in my opinion, I feel that there are certain packages in Nuget that include css files  in which developers should use with caution. A good example is Bootstrap, which you should try using less instead of your own css file other customizing the bootstrap css. The reason for this is because less allows you to separate your styles from the root of bootstrap and makes it simpler for later updates with bootstrap. Not to mention the possibility of changing the third party libraries that you might be using. If the library you are using isn't in a less format I would be worried about customizing it because it would only make things harder for when you want to move away to something else.     I think most developers out there are using Jquery UI or bootstrap but not many are using less which puts a lot of projects in danger for restyling and restructuring their code. I've made it my goal to try and not to separate css files into more than one css in prod

Galaxy S Fascinate SCH-I500 Notes

Samsung Galaxy S/SCH-I500 - XDA-Developers Samsung Galaxy S/SCH-I500/Building The Kernel - XDA-Developers [ROM][9/25/12] MIUI.us Presents MIUI v4.1 2.9.21 Jelly Bean [4.1.1][Stock CM9 Kernel] - xda-developers Divers Samsung Galaxy S® 5 16GB in Black Support | Verizon Wireless Cyanogenmod Resources Devices Overview - CyanogenMod Information: Samsung Fascinate ("fascinatemtd") - CyanogenMod CyanogenMod Downloads CyanogenMod/android_device_samsung_fascinatemtd

Javascript Focus event on IPad

    This article goes in hand with one of my jquery plugins that I am creating. The purpose of my plugin is to store data items into a table. I'm not perceptually interested in writing out Sql so creating a plugin that can hand a database from a UI perspective is rather important to me. I know there are a few plugins out there that could achieve what I want but I wanted to take up the task as a learning experience. Either way that just some background information about this article, what this article is really about is a request that was given to me for my plugin that I could not directly met. The users wanted to have the Ipad auto focus on an input when a device returned some input via bluetooth. However because of how the Ipad's interfaced with input this was not allowed. My Solution There was a comment in one of the links that provided a possible solution but I think it was too much of a hack and didn't want to go down that road for such a small piece of functionali

Getting a Unity Game on Steam

    I have been working quietly on my next game for one sometime now but I thought it would be good to write out this question I had since I wasn't the only person wondering it. My question was, can I use unity to publish a game on Steam? I wasn't sure because I wasn't too familiar with Steam's publishing process and didn't find any information with Unity from the UI. What I learned was that you can but need to go through their process called.  Greenlight Resources Unity Basic on Steam? - Unity Answers Steamworks - FREQUENTLY ASKED QUESTIONS Other Game Publishing Outlets Games | Desura Little Indie - Shop Rockin' Indie Games one pixel at a time - Indie DB

Useful Javascript Libraries for IE8 Support

I hate to be held back because limitation and IE8  is a gross limitation for a browser. However when I can provided the support by doing little work on my end I say why not. So when iI have to met this little requirement the are two libraries that come to mind. The first is Respondjs  and one if the things I love about this library is that it works just how I would want it to. I don't need to change any of my CSS files, nor do I have to create my styles any differently than  what I am doing for modern browsers. So thinking ahead if I ever wanted to drop support for IE8 , would simply remove the js file. The second is  jquery-placeholder  which I like because of the fact along with the placeholder attribute so that is it not completely useful in IE8.   The things I would like to see with this  library  is it automatically be  set up  for all placeholders. Currently you have to set that part up but its super easy so no complains. 

Recursion in Javascript

    The setup goes like this... Prompt the users with a dialog which inside has a text box. Then allow them to place into comma separated data. When they are done have them click save which closes the prompt. So far so good, split the data and place them into a series of input boxes. Now it doesn't matter how many boxes of input there are because it will just create more if the user's input is greater than what is available. Given this task I thought I would try to do it by using a recursion. Up to that point I had never used a recursion in Javascript. Problems I faced Everything worked out fine until I hit this error which I got the  Maximum call stack size exceeded error  and what I had to do was define the upper limit to my recursion. In my opinion I would be wary with using recursion. Resources Recursion (computer science) - Wikipedia  - Just in case you forget. Javascript - Maximum call stack size exceeded error - Stack Overflow Calling a javascript function recu

The Difference between Agile and Scrum

For over five years now  I have been using Agile  methodology now.  A lot of times when I heard the word Agile, at one point or another I heard the word "Scrum". So what is the  difference from Scrum and Agile . To summarize the link Agile is just an concept that gets  implemented  by Scrum. A little more history on that can be explained here .  http://scrummethodology.com/ This video helped me make sense of things... Resources Agile and Other Development Methods - CodeProject Team Foundation Server - Wikipedia http://agilemethodology.org/

Bootstrap Dropdown-Checklist

    When it comes to web development there is a lot of ways achieve what you want but more importantly it is critical to know what to look for if you have no clue how to achieve it. Over the last five years I have become very efficient at finding examples to achieve my work and to push that even further what I have done is put those code snippets in my back pocket for other projects. Some codes I come across I modify for my own use, others I can simply plug n' play but having that code off hand is quicker than writing it. So what I'm leading up to is an example of that concept. I had a task recently to make a dropdown styled in bootstrap , where inside the dropdown was a series of checkboxes. Now by default the behavior for bootstrap would close dropdown immediately after I clicked. What I need is to keep the dropdown open until it is blurred. What I found with a quick search was what I needed but still once I had the code, and rather than just plugging' it in. What I did

Asp.Net MVC: Error Handling Ajax Partial Views

During the second year of my job as a Application Developer I was ask to design some type of error handler to properly display partial views that were pulled in via ajax. What was currently happening was that partial errors were being displayed as full page error and causing other issues when Jquery libraries being loaded in twice. Questions Could you create a partial view and full view error page for display appropriately for both? So in the case where it was a partial view error the error page would simply display inside the partial. Is there a way to determine by ActionResult type the error handler needed? My Solution ///This is an attribute for PartialViews. It handles any errors and override the basecontroller's OnExpection method. public class PartialErrorAttribute : HandleErrorAttribute { ///Similar setup to the base controller OnExpection method, but has a special partial view error page called _ErrorPartial".<summary> /

Updating Jquery Nuget Package to 1.11

       I feel a lot of developers out there are unaware of the fact that they can update Jquery without any work, and since I did the digging already I wanted to get other developers excited about Jquery 1.11.  If  currently you try to update the Jquery Nuget package via the package manager currently is will only display Jquery 2.x.x which may break some javascript instead use the simply use the command console to update.  So if your using Jquery's Nuget package with your Asp.net MVC application it's easy to update from 1.10 to 1.11. There is no breaking changes from what I have read with the update and if you're trying to support IE8 you should be in the clear as well. Command PM> Install-Package jQuery -Version 1.11.0 Also just as a personal note I find the  warning message that appears for jquery 1.10 to be extremely annoying and I feel its my mission to help out others by removing it from the internet. Update Can I keep Nuget on the jQuery 1.9.x/1.x path

Penguins Rising: Html5 Custom Cursor Support

Image
    Apart from the original Penguins Rising game, I thought it would be interesting to allow the user to modify or upgrade their cursor for a particular gun. However this was not possible for Internet Explore at all, even for 11! In most cases when I can not implement something in one browser or another, I simply default to the original structure.  With though IE styling breaks completely when using custom cursor so I had to scrap the idea for now. My goal for Penguins Rising has always been to support "modern browsers" and "mobile browsers". IE9 is in that grey area but IE10 is a must and because of this I have to just use the built-in cursor styling which is how it is setup right now. Sadly this limits me to only what is available in the browser's styling. Just an idea of what could have been... Resources CSS cursor property How To Create an IE-Only Stylesheet CSS-Tricks  - Not helpful in my case. css - Custom cursor image doesn't work in a

Asp.net MVC: Partial View to handle Multiple Models

    I was working on this idea a few years back and the idea was to make two partial views in an asp.net MVC more scalable. I was looking the down road for something that could handle whatever the object was and display it. What I later discovered thanks to a colleague was that I should just do a reflection of the object but I feel the better longer term solution could be found in  third link  of resources. Rather than spend anymore time on this idea I simply kept the two partial views and wrote this down as I have bigger plans with this strategy in mind for a project. Resources Using partial views in ASP.net MVC 4 - Stack Overflow How to get the list of properties of a class? - Stack Overflow How to get data to my view that comes from more than one object? - Stack Overflow When To Use Templates vs When to Use Partial Views - Stack Overflow ASP.NET MVC 3 Partial View Template - Stack Overflow

Google Authorship with Blogger

Image
    There is no guarantee what will show up in google search for your content but I learned some cool ways  you can influence what appears and I feel not enough people are aware of Google's Authorship feature. This feature allows you to digitally sign off on web content that is yours. That is how I describe it but you can find the actual description in the resource links. Cool Results! The setup for this was really easy and quick, I simply followed the second option for setup and placed the ?rel=author" inside my href that was linked to my Google Plus account. Resources Google Authorship Google Structured Data Testing Tool  - My results! Author information in search results - Webmaster Tools Help

Exporting Blender Models to WebGL Notes

    Here is a collection of notes that I took sometime when I was working on " The Rust Spot " project. My original purpose for doing this was to create 3d auto parts and display them into the web browsers. Allowing users to get a better idea of what they would be purchasing before hand. Resources Blender 2.5 Exporting X3D Files and using X3DOM Part 1 - YouTube  - Demo WebGL #Content Creation- Wikipedia  - X3DOM in relationship to WebGL X3DOM-WebGL Tests Blender Web HTML5 Canvas how to  -  Concept in how to achieve Blender-webgl-exporter - A WebGL JavaScript exporter for the Blender Blender export — X3DOM  - Working Example!

Penguins Rising: Responsive Text with the Title Screen

Image
    With little testing as possible I wanted to create a title for penguins rising that was styled and would resize based on the device. I knew how to achieve this using css media queries however I would still need to test my queries on multiple devices which would take more time to test than actually write them. So I wondered what if there was a faster way to do this. Looking around I found ways to achieve this but most required Jquery and creating an event trigger to update the text size. Which wouldn't be too difficult to create but I have removed Jquery from my solution for sometime now. Things I looked at for this solution Text (not changing it too often.) Font-size - scale to full width of the screen. Font-Style - Added this later but not all devices liked text strokes in css. The answer if very clear to me and one that at the beginning I considered, but I wanted to weigh all my options first. By simply making the Title a image and setting the width to 100% should

Create Custom Webconfigs in Asp.Net MVC

Image
   Here are some highlighted notes on creating a custom web-config, that I wrote after finding a very quick and easy solution to. Overall the process is very easy to get started just I felt pictures were needed because the solution I found lacked any. Start of our Application Without editing, and by default Asp.net MVC comes with a Debug and Release config but since I like to create a QA stage for my configurations with all my application another webconfig needs to be added. Now right click on the project solution and go to properties , this will bring up the configuration manager. You can also just click on the build tab shown in the second image below. Configuration Manager/Properties Under the configuration tab and inside the dropdown simply select "New" and add in your custom Config name, for this article I just name mine example. Important keep the l eave the "create new project configurations" check." If not checked you will not be able to

Asp.Net MVC Warning Msg: "Consider app.config Remapping of Assembly"

    I don't like to ignore warnings if I can help it so looking at the output window in Visual Studio I can see the following message listed in the title. I make it my goal once a project is working and completely setup to go back and clean out as many warnings as possible which in most cases I do this while I'm working. There are a lot of ways to see this warning message but one of the reasons that it appears for me is from updating packages. For one reason or another some packages aren't updating properly and the older versions are still being pointed to in one or more webconfigs.     There are two approaches I have found to solve this, one is updating the webconfigs manually which will require you to look at the packages and versions being pointed to in the webconfigs. Or you can try the using Nuget command console. Targeting just the packages that appears in the warning message, and re-installing. This sometimes will work but if that fails there is a step had to I try

Coursera: Gamification Notes II

Motivation & Psychology (I) For Gamification you need psychology to a certain degree to understand users motivation and making gamification effective. Motivation is different for everyone and can be counterintuitive.  Cognitivism  - about the mental states, internally. Behaviorism - looking externally at what people do. Testing what goes in and out of the persons behavior. Making a stimulus connect with a behavior and leading to something good or a consequence.  Observation - Pick up on people's reaction and learn from it. Feedback loops - Users seeing this learn and get a reaction from it. Reinforcement - Learning between motivation and gamification system. Behavioral economics  - "lets look at what people actually do" Loss aversion  Power of default Confirmation bias Cognitive Evaluation Theory Tangible/intangible Expected/unexpected Contingency Task noncontingent Engagement Completion Performance Reward Schedules - A ti

Coursera: Introduction to Databases Part II

    Continuing from my previous article  this post is a collection of my notes, and my study of SQL databasing. Relational Algebra Tuple - Wikipedia sql - What does the term "Tuple" Mean in Relational Databases? - Stack Overflow sql - Clear explanation of the "theta join" in relational algebra? - Stack Overflow Two selection operators in a row can always be replaced by a single selection operator whose condition is the "and" of the two selection conditions. If there are two projection operators in a row, the attribute list of the second (outer) projection must be a subset of the attribute list of the first (inner) projection. Thus, the first projection can be removed without changing the result of the expression. SQL Join Inner Join on  Condition Natural Join Inner Join Using (attrs) Aggregation Aggregate Functions (Transact-SQL) Aggregate function - Wikipedia, the free encyclopedia SQL Functions Null Values  in relational databas

Coursera: Terrorism and Counterterrorism Notes

   The main reason for  me taking this class even though it was not related to the computer science was to gain a better understanding on terrorism and also to make any connections to related topic in the computer science like cyber-terrorism . To explain a little bit more on why I felt I should have a better understanding on terrorism draws back from my last year college. During which the summer of 2013, I meet with SUNYIT's  president. Our discussion was about collaborating with  Google Maps' floorplans . With the help from a Google Maps team, this project would allow students to find classes and events more easily while on the campus. However this motion was denied and had end on the note that terrorists would use this new technology to their advantage. I strongly disagreed with this acquisition and so I started my research on the topic using the Tags: SUNYIT, Google Maps. Questions to ask? Who would have an agenda? National?  Local? Religion? Are we on another

Penguins Rising: Caching in Google App Engine

Image
      One day while I was exploring Google's Page-speed Insights to determine whether there was anything I could possibly improve with Penguins Rising. I discovered that I was not  Leveraging the browser cach e . Up to this point the only type of caching I had done was with the HTML5 cache manifest, however  this was  different than what Page-speed insight was advising me with and this was also what lead me to my question that is the  majority of what this article is about .        Question Lucky for me, I am not the only person to have asked this, but " What is the difference between a Cache Manifest and a Cache header? " As it stand with Page-speed Insight my current results with  Penguins Rising (will vary)  as you can see for yourself. Using Expiration in the Content Header You can set the expiration time however you like, I tested my application with 10 minute expiration date. //Inside the app.yaml default_expiration : " 10m " An Ex

Popular posts from this blog

UI-Bootstrap Collapsible Sticky Footer

Installing Windows on Acer chromebook 15 cb3-532

Aspetcore: NLog with Postgresql