Posts

Project: Aptitude-Words Update 1.2.5

Image
       Recently returned to my chrome extension because I had some features I wanted to see and needed improving. I like to pretend I'm the only person who really uses this extension because I really don't know who my users are or what they would like to see but I'm open to suggestions. There is stats for the extension on weekly users but I don't think much of it. You will need to re-enable with this update since I added Google Analytics but not using it yet. Features ( Live now!) Trash button (rather than click checkbox) Donation button (I'm doing this with all my free apps) This is a one time purchase in the app, I'm looking to get rich. Redrawing words after delete. In the Future  New Logo (working on the art with a material design look). Google Analytics (I'm curious to know what popular words ppl are captured.) Page to display - word of the day, logic to prevent bad words from showing so dont try it... Reordering words - Just a r

Aspnet: legacyHMACWarning

Image
    Stumbled across this bad boy in the webconfig in an old project and was curious what it's purpose was. Since the comments didn't really help and I spent some time on to uncover its secrets. "This prevents the Windows Event Log from logging the  HMAC 1 that is being used (when  the other party needs it).When targeting ASP.NET MVC 3, this assemblyBinding makes MVC 1 and 2 references relink to MVC 3 so libraries such as DotNetOpenAuth that compile against MVC1." T he comments don't really help, in fact only rises more quesitions. Why is the DontNetOpenAuth ever compiling against MVC1? DotNetOpenAuth with MVC 4.0  - " Yes, DNOA is built against MVC 1.0, and this is by design so that it works against all versions of MVC (given the appropriate redirects). This is purely an MVC version thing -- not a .NET 4.0 thing" Resources HMACSHA512 Class (System.Security.Cryptography)

UI-grid: Bootstrap Styled and Dynamic Height for Pagination

Image
     If you've looked at my catalog-demo , you might have noticed that I used UI-grid instead of Ng-grid. I still work on a few ng-grids but I've started to really use ui-grids. Code : $scope.gridOptions.onRegisterApi = function(gridApi){ gridApi.pagination.on.paginationChanged($scope, function (pageNumber, pageSize) { var newHeight = (pageSize * 30) + 68; angular.element(document.getElementsByClassName('grid')[0]).css('height', newHeight + 'px'); console.log('get pageSize - ', pageSize); }); }; Solution:  https://fassetar.github.io/blog-examples/uigrid-responsiveheight/   Notes     To get the grid's height multiple the grid by 30px and the page size. Then add 68 to prevent the scroll-wheel moving the grid ever so slightly. Set the default for you're page size in css as well. The css I created to make the grid look like a bootstrap

UI-grid: Bootstrap Styled and Dynamic Height for Pagination

Image
     If you've looked at my catalog-demo , you might have noticed that I used UI-grid instead of Ng-grid. I still work on a few ng-grids but I've started to really use ui-grids. Code : $scope.gridOptions.onRegisterApi = function(gridApi){ gridApi.pagination.on.paginationChanged($scope, function (pageNumber, pageSize) { var newHeight = (pageSize * 30) + 68; angular.element(document.getElementsByClassName('grid')[0]).css('height', newHeight + 'px'); console.log('get pageSize - ', pageSize); }); }; Solution: Notes     To get the grid's height multiple the grid by 30px and the page size. Then add 68 to prevent the scroll-wheel moving the grid ever so slightly. Set the default for you're page size in css as well. The css I created to make the grid look like a bootstrap table is very basic and probably could use a lot more styling. Like

The Three Types of Content with Web Development

Image
Background        I don't know if anyone else thinks about content the   way I do and I'm always challenging myself to see if my thoughts hold true with others. This way idea might seem simple but it goes way back in college when I was just starting out and learning to code. During one of my classes I asked myself the old question " What is static? When is it static? " From all my experience and development in the field, I've came up with this approach which I think is based off current technologies but mostly on my experencies with cms technologies. This article goes really inhand with my other article on The Four Components of a Web Application . Details       The way I've answered both questions is by treating everything as dynamic (to some degree) and to imagine that everything eventually becomes static.Whether its a database query or whatever; to some degree everything becomes "out dated". So at what cost is it worth it to make something mo

Angularjs + Asp.net MVC Routes with Partial Views

Image
     Recently I've had the great opportunity to create something pretty awesome and I think it helped me seperate or clear up any confusion I had on project where I used two MVC frameworks on top of each other. Those two frameworks are usually AngularJs and Asp.net MVC. It can be a little hairy especially if you're new to Angularjs but when you use them right web developing is be a snap. Client Side $routeProvider.when('/', { templateUrl: 'home/_home', controller: 'AppCtrl' }).when('/product/:id', { templateUrl: function(params) { return 'home/_product/' + params.id; }, controller: 'AppCtrl' }).otherwise({ redirectTo: '/' });   What's really important here is the route for product and the parameter (look where it takes id). The id can hookup to any middle tier and from there it can handed to a model bound partial view. You can even mix in angular html attributes since the page wil

Diving Back into Selenium and Getting Somewhere!

Image
     Recently I've gone back to using Selenium and started to really get comfortable using it. One of the problems that I constantly face when using Selenium is not having good example and looking at Selenium as a whole in whether it is worthwhile. My problems only get work when I have to ask me  whether to use the Selenium IDE or the server package.  Which is more scalable to do? Which one is better to give to a team QA that non-technical? Some of these questions can be answered on the Selenium site but some of them depend on your work environment and how much time you want to spend on creating a system of some kind to do all that.      What you really want for all project is something that you can automate across popular browsers not just a single one. Plus avoid doing a dry run every time to correct your UI tests. So the IDE which really a plugin is not going to do that for you but even if I gave it to a QA non-technical team I don't think it would be used effectively

The Three Types of Material Design Libraries Available

Image
     There are a tons Material Design projects out there but I choose these three because of their popularity and for the fact I just found these projects interesting for a few of own projects. I work in a variety of environments so each gave me certain advantages over the other. This article is just how I broke them down and what projects I plan use them for.                  Angular-UI Team | Materialize | Material Design for Bootstrap https://material.angularjs.org/ Useful for when you are using angularjs. missing some stuff or just not shown in the documents. Great for my single page example. http://fezvrasta.github.io/bootstrap-material-design/ Useful for bootstrap project and updating them to material design themes. Wish they used Sauce labs Tests like bootstrap. Great for updating my bootstrap sites and my blog. https://github.com/Dogfalo/materialize Uses Jquery, and simple to get up and run just like bootstrap. Very close to other css libraries but still

Javascript: Track Errors with Google Analytics (analytics.js)

      I came across an article by David Walsh and just wanted to expand on the topic. When implementing this feature watch out for the differences between analytics.js and ga.js. The code below is works with analytics.js. Another thing to be aware of is that some errors will be created from Adblocker. I thought of adding the logic but I didn't want to leave it up to chance that I might accidentally ignore some real errors. Instead what you can did is just filter it in Google Analytics and aggregate against with the number hits. (function (i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { (i[r].q = i[r].q || []).push(arguments) }, i[r].l = 1 * new Date(); a = s.createElement(o), m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); ga('create', 'YOURID', 'aut

Shields.io for Google's PageSpeed Insight

Image
     This was an idea I had for some upcoming projects I'm working and it includes the use of  shields.io to display important information on the quality of the front-end code. Also to give to give an idea of what's on a production server. This would really work for projects where the code was mostly open-sourced. Users could get a glance before hand of the boilerplate/template for particular project and know the quality it has. I did start to write out some code to do this and currently the only approach I have is using it via Google's API service which requires an API key. Below is the api request and the parameters need, from there all one needs to do is hook up, the three fields in shields.io and return the  appropriate  svg.  API: https://www.googleapis.com/pagespeedonline/v2/runPagespeed?url=http%3A%2F%2F{WWW.EXAMPLE.COM}&strategy={desktop||mobile}&fields=ruleGroups&key={YOUR_API_KEY} A Difference in Implementation      Be aware there is a

The New Way to Create Jquery Plugins Using Grunt & QUnit

Image
     This is my take on the Jquery basic documentation  for creating a plugin. There are a lot of new ways to create a jquery plugin and even more frameworks to replace jquery altogether. However I found myself at that point where the scope of the project was limited in a framework but had large enough components that could separated into plugins. I've removed all the business logic and now just want to create a very scalable plugin. Example Project & Setup     With my Jquery Plugin , I'm using Nodejs and continuous integration to do the heavy lifting. All I'm doing is taking a selected element from the caller and determine if it already has a table. Then if it does attach data to provided url's from the developer. Simple enough but there more to it, I just simplified the explanation incase people want to skip over this part and others who are interested can just read more about the plugin on github. Like Peanut Butter and Jelly!  Tools & Systems T

Running Solr on Google Cloud

    Google App Engine has gone under a great number of changes and originally I set out to use it to my advantage but instead went through Google's cloud platform to run solr on a virtual machine. This gave me a lot more flexibility and didn't require to change any of Solr's source code. In theory changing the source code to handle the file system available through app engine would work.       I'm not going to get into the steps of how I did this, I think it's pretty straight forward, setup your linux vm and install java, then set up tomcat with Solr. With my catalog-demo, I used the site to proxy to the vm and gave the vm permission to only my web site's IP. The links below are docs that give more information on that. As far as costs go, it is very cheap to spin up a machine and to get the Solr server running. However I'm not happy with the solution and know I can create an even better solution so I've shutdown the server and started looking at other

Just a Thought with Asp.net MVC and Portability

        Since the release of Vnext this idea has become less of a concern for me but a majority of my "professional" projects have been in MVC and with Vnext offering larger amount of support this article doesn't really reflect any of my current solutions. Instead it is just a thought on allowing me to continue with the frameworks that I currently use in my career with frameworks that are available to me in my personal projects.       It is very important to me, to create fast, low cost, and high processing application. As I like build with large number of tools in order to increase my productivity since I have less time at home. Working in familiar frameworks between work and home isn't a must but just something I think that works in my favor. If all else fails, I can just pick things up. I go along. Plus there's always the bonus of my javascript skills.      My original thoughts for this approach show below was to move all my controllers into an angular pr

Bower: Installing Bootstrap without jquery

    For one of my projects I was using AngularJs and UI Bootstrap. Which converts all the jquery code to angular code and adds some helpful directives. From what I notice with bower was that I couldn't install bootstrap without jquery. Since it was a dependency of bootstrap.    Note, I'm still working on this!  It's important for me publish this since I've gotten so far with it. As started out I thought what I could do was to install the bower components and then try to exclude jquery in a separate folder. However in another article I will look at a better solution. Which will be where just ignore the jquery and combine the files I want. However I can see reasons for both approaches. Like in my case I wanted to remove some nuget packages and then pass off that task to bower, which I think is now how Asp.net vnext is doing it. In my case though there was too many views names js/css files and just too many js and css files.     So this first part isn't much but I t

Array Value Url Queries

Image
    I have written some articles on Solr and even more on AngularJs however when it comes to URL queries, I think a lot of production solutions do the opposite of what I'm about to suggest. I think the simpler approach is better and if major companies looked at their solution might find that their UI to be over cumbersome. I think if a URL is public it should be straightforward with what its values mean. This gives advanced users the ability to directly navigate and novice the ability to bookmark urls.        The problem with facets in search grid is that you have a limited number characters you can use. This is less of a problem in a post form but you won't get link for your novice users. I don't like the idea of a "bookmark button" - style UI where it provides the users with a guid that is unique to their search. So a get method approach is more appropriate for the behavior we want. At one point I thought it would be necessary for guid value kind of system.

AngularJS: Not Working on Plunker

Image
    Plunker is my goto cloud based IDE for quick setup and demo purposes. It's all about what you prefer really and there a tons of choices out there. This is two common problems that I faced but haven't since I'm aware of them, they're not really a problem anymore. I just wanted to keep notes on this incase I forget in the future. Plunker First: " The plunker has  ng-app  instead of  ng-app='directive'  in the  index.html " Resource:  Why this angularjs example doesn't work on plunker? Second:  " use   angular . bootstrap ( $ ( '#your_div_loaded_in_ajax' ),  "myApp" , "other_module" ]);" Resource:   AngularJs ReferenceError: angular is not defined Notes     Also for the angular file don't use async or defer. This always goes without saying your custom script should come after the angular file even if its in the index.html file itself; just for good measure. 

Chrome Extension Project: Aptitude Words Part 2

On my  previous article   I briefly introduced this project because it came to me when I had very little time but I knew if I didn't publish it at the time I probably wouldn't for another month. The project was finished as far as things going with a first wave of implementation and I have a lot of ideas to add on this project. This is application really for myself rather than any particular audience. With my design I looked at first how I wanted it to behave and its kinda interesting to see where I'll end up with this one. I don't let this project get in the ways of my high tasks and its really just for fun. So updates will probably minimal. You can get all the information about the project on Chrome marketplace . Future releases Categories - sometimes you need to organize them in a way to remember them. Removing - delete a whole category. Adding - Drag n' drop a word into a category Emails - Get weekly emails to let you know which words you use less ofte

Bootstrap: btn-lg is smaller than input-lg

Link:  btn-lg is smaller than input-lg Example:  input-size-bootstrap Issue     In all modern browsers except in IE10+, it seems that the large buttons with large inputs for input groups are smaller. The difference is only a pixel but is noticeable on some screens. To be clear this issue can be avoided if you  use the input-group-lg  however my test prove that the heights stay consistent regardless which style classes you use. I didn't find this out until I started looking into the issue and I think this is kinda nit picking but something that should be corrected to prevent future mistakes. Changes     For my first attempt I tried changing the @line-height-large but if I changed the @line-height-large this affects the input-group-lg, and select input-group-lg as well as the large buttons. So instead to just change the large buttons I set the large button line-height by adding a 0.01 value. This still had problems in firefox, which lead me to the final solution below.  File(s

My First Interview with Google

    Sometime after I  graduated back in March, 2013 I was lucky enough to have an interview with Google for a six month contact on the west coast.     A lot of time has passed since my interview and this is just some of the notes I took before hand in order to  prepare . Regardless of the outcome of this  interview  I still I learned a great deal, and look back at it as an example of how to  effectively  prove my skills. I was d efinitely  was  nervous on this one haha.   Jobs description and position daily work type at Google     "In this critical position, you will be part of exciting as well as   new fast-paced projects. Your role will include working as a team with mechanical, hardware and software engineers to  tackle challenging design issues while improving existing manufacturing processes. In  direct contact with engineers, you will be  i nvolved in the entire lifecycle of several products , from early prototyping to full production and  worldwide  deployment.&q

Popular posts from this blog

UI-Bootstrap Collapsible Sticky Footer

Installing Windows on Acer chromebook 15 cb3-532

Aspetcore: NLog with Postgresql