Posts

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&#

Using Html Entities rather than Icons

    This article is my opinion on the subject of html entities vs. png or icon files in a web application. If you have been watching bootstrap and seen the beta version of bootstrap 4 you might have seen some of the examples using entities. Initial I thought this was an improvement and in a lot of ways still do. But now I have given it some thought about the longer term of solution. I still think font-awesome is a much better choice to go because of the ability to modify the styles or simply create custom ones in a svg.  I know entities are nothing new but just wanted to write out why I would use them in some cases and not others. Use case for  Entities       For one of my sites I actually used the up and down triangle entity.  I think it’s a good fit for one the ui-grid and other javascript libraries that require some kind of indicator of sorting. In this situation it’s really a grey area of whether the icon should be an icon or entity because in this use I'm not going to

Dynamic Development to Static Deploy

   I believe this is an approach beneficial to any application for performance reason. If an application needs to be scalable but can remove the dynamic references there is a opportunity for improvement. With task runner or build process like gulp, grunt and asp.net mvc's bundle for example this is the same solution. What I'm point to is the things I want to create in javascript but don't necessarily need to be dynamic. For example Angular's template property with directives or component's and even routes. While I do like to use templateUrl in development for performances reason I want to include it in the statement as a template. If I'm trying to make the most of my code I need to inject directly but for validation or organizational reasons I want to point it dynamically.    This isn't a new problem in the computer science field but I think a lot of web developers will agree to injecting regardless if its development. It makes the code a little less mana

Top-Down Development

Image
    If you ask me what my development style is like? I would have to describe it as a form of top-down view with a model view approach. I've been describing my approach to build web application this way for a few years. Every now and then I encountered a developers who will agree with this approach. I guess you can just take the definition from wiki page but really I have my own way of marketing it.     "Throw everything away thing and get ready to start fresh. That's just how it is with every new javascript framework and I think it’s safe to say if it not middle-tier or backend code get ready to rebuild it. This is actually an awesome thing and you need to believe it because forcing development to the backend or middle tier every time something new comes along isn't realistic. Besides why not have the biggest impact on an application's lifecycle with the least amount of work!?"     This is how I marketed my approach it probably could use some work for s

Popular posts from this blog

UI-Bootstrap Collapsible Sticky Footer

Installing Windows on Acer chromebook 15 cb3-532

Aspetcore: NLog with Postgresql