Showing posts from October, 2016

App Indexing & Sitemaps in Single Page Apps (Firebase + Angular)

    I started this article while working on the mypatco app and for the past three years or so I've been talking about developing single page applications. I always talk about the performance and not much on seo. With my other projects which require a more complex middle-ware I've looked at google's notes on how to properly setup for some example but found some of them just don't work or takes a considerable amount of time to appear in the results. Found a npm page that might be helpful grunt-jsondl, haven't tried it but below is how I handled in the website. However note that the station markup isn't working or just not showing up in google's testing tools. HTML <div ng-controller = "TestController" > <jsonld data-json = "jsonId" ></jsonld> </div> Javascript var myApp = angular . module ( 'application' , []); myApp . controller ( 'TestController' , [ '$scope' , functio

D3Js Exploding Pie Chart Part 1

    With one of my current projects, I have been working on creating a way for users to click on individual pieces of a pie chart and slightly pull out that portion. It's a small and pointless feature, something I like to call eye candy in the front-end world.  For people some people it illustrates the content better. I found myself interested in UX. It's fun for me to recreate in d3js since the problem is challenging. Problem    This isn't a math problem but more of svg drawing problem, at the point where d3js draws out the pie chart there is some calculations to the index to see it out of order but if I can understand the method being used then I can modify it to include the exploding property. var explode = function ( x , index ) { var offset = 80 ; var angle = ( x . startAngle + x . endAngle ) / 2 ; var xOff = Math . sin ( angle )* offset ; var yOff = - Math . cos ( angle )* offset ; return "translate(" + xOff + ","

Intuitive Third Party Packages

   In relevance  to my package npm "flavorstrap" this is a little of a working progress for me and a few of my github projects I hopes it helps others. I've based this heavily on what I've seen others do  and what I think looks helpful to others. In that there enough context provided for others to go off from github package. I I face this problem with sometimes but I love to code so I spend the extra time to read someone else's code using a project as well. It helps if the documentation isn't there or if the code shows something the developer didn't think of.  Now this is just in my opinion and not so much a complain but advice for myself. I would definitely say I have used my share of third party libraries more often than actually written any but I do appreciate the ones well written. For example bootstrap and android's documentation pretty good and they even include some examples. However there are a couple of things I would suggest. For starters d

Material Design for the Chrome App/Ext Store

    I don't work for Google but if I did I would show some love to the much needed chrome app & extension store. I would even take it further by making it have value to other browsers but that's another topic. Either way this article is able adding chrome's app/extensions to the store. Taking the Google Play Layout and add Chrome App/Ext Using the Google Play's layout as a template but fitting the needs of the Chrome Store's needs BACKGROUND-COLOR: #FFC107 background-image : url( data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAABGdBT…DAS7ZcAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg== ) ; } Original Look Note  The Google Play Layout has a minor bug where if you have a cropped screen in half of the window and scroll right it will sometime make the menu disappear. It will reappear when you scroll down, if this was on purpose why not make it like a side-nav component. Links

Separate or Combined Frontend & Middle Tier Solution

   Agnostic code that you can pick and choice or reuse from the browser to the server is the ideal situation to be. I believe there is only two way to get there. By a nodejs server environment or a transpilers like typescript. JavaScript isn't going anywhere and probably will be transformed as a lower level language in future generations. Which a lot of JavaScript frameworks seem to completely do. Background     So now some bit of my background on what I've done in the past and how I got to this way of thinking. Initial I started out with aspnet nvm and keep running into the concern of mvvm which is constant problem if your models done match. In aspnet mvc front-end is usually included in with the middle-tier. I have nested nodejs inside aspnet application and this was before aspnet core so it seemed like the right move. After my third job I wanted to completely move toward nodejs to solve this mvvm problem. However security and usability were major concerns my employer had

Posting Null File Input in Dataform Via Ajax

    This was actually quite annoying and was needed since the api I was given by another developer won't change it so had to go around him to achieve this. To be clear I was posting a form and inside it was a file input with some other input text values. The file input needed to always be included even if it was null...Don't ask me why. Common Errors  These errors can be corrected from my notes. Unexpected end of input response from wp_handle_upload Unexpected end of input Notes Create File Object var f = new File ([ "" ], "filename.txt" , { type : "text/plain" , lastModified : date }) Append file to form object form . append ( "blob" , blob , filename ); aFormData = new FormData ( $ ( "form" ). get ( 0 )); Just check the length of files property, which is a FileList if ( document . getElementById ( "uploadFile" ). files . length == 0 ){ console . log ( "no files

Fixing a Windows 7 Machine

 Sometimes I have to work in an environment I disagree with and its in those situations I learn the most because I don't just accept my situation. I adapter to improve them. Windows 7 is already out the door but some places hold on to it like its all there is. I'm using windows 10 to work on my personal projects and can say as a developer it is a lot easier to manage. Fix Sound crash This is related to the  C:\Windows\System32\audiodg.exe   but restarting this process sometimes doesnt fix the problem so do the following. Right click on  My Computer Chose  Manage Select  Device Manager  in the left panel Expand  Sound, video and game controllers Find your audio driver and right click on it. Chose  Disable Right click on the audio driver again Chose  Enable Roaming account & Machine ProfilePath /HOMEDIR:pathname Sets the path for the user&#

Popular posts from this blog

UI-Bootstrap Collapsible Sticky Footer

Aspetcore: NLog with Postgresql

Installing Windows on Acer chromebook 15 cb3-532