Posts

Showing posts from December, 2013

Using TFS with Eclipse

Image
This article is from the experience I gain while setting out to complete my capstone and a point in time where I was exploring that ways to manage a team. I also wanted to help move things forward with the process for the team to code rather than spending more time on design. My capstone was along the side with three other colleagues and we did not all have the same idea with what systems or tools should be in place to help us achieve our tasks. Still after the fourth change of repository system in my team, I figured it was time that I took charge and started making changes for the better with my suggestion to use TFS. Plugin :  TFS Plug-in for Eclipse | Eclipse Plugins, Bundles and Products - Eclipse Marketplace Right Click Inside Project Explorer > Team > Shared Project The following plugin behaves much like the native built-in tool for visual studio but with a slight twist for the  tab locations because of how eclipse is setup. At first when I started researching thi

Visual Studio "Access Denied" When Checking in with TFS

The problem was that when I went to check in changes with Visual Studio, it would report back saying I did not have permission. I knew it couldn't have been the TFS setup because I had everything configured straight forward for a single user which was just me and I know it was fine since it was working a few days ago. The only thing that changed on my machine was the that I lost access to my domain account that I was working with. So I created a second account that has administrative permissions, which might have lead me to this problem. Resources You may receive an "Access is denied" error message when you try to debug a Web application in Visual Studio .NET, and you have administrative permissions  -  First search got the job done! Access Denied on TFS - Stack Overflow  - Just looking at other reasons that could have been the cause

Inheriting Apps with Asp.net MVC

While cleaning up some code in the webconfigs of an Asp.net MVC application I came across a line of code to which I had no knowledge of and even more so was showing up as an error.  I asked myself was it's purpose and most of all why was the Intellisense saying "The 'inheritInChildApplications' attribute is not allowed."? Resources How do I allow all users access to one route within a website with integrated auth? - Stack Overflow Changing ASP.NET web.config inheritance when mixing versions of child applications - Scott Hanselman Conclusion All the information can be seen and found in the following links but after looking at the comments you will find the reason behind the shown error.  " Be aware that the inheritInChildApplications attribute is not part of the web.config schema (even in VS 2012) so you will get blue  squiggles  under it with a message of "The 'inheritInChildApplications' attribute is not allowed." It will, however,

Penguins Rising: Eliminate render-blocking JavaScript

Image
For the most part I have already done a lot of the work for this and this has always been something in my practice to do. In the past what I have done is render all javascripts at the bottom of the page and all styles at the top inside the header. However with this application and since so much of my code is customized and mineralized, I believe I have a small issue with the Jquery taking up more time than the css to load. So Close to 100/100! Code (function () { var script = document.createElement('script'); script.setAttribute("type", "text/javascript"); script.setAttribute("src", "js/jquery-2.0.3.min.js"); document.getElementsByTagName("head")[0].appendChild(script); Resources Remove Render-Blocking JavaScripts - PageSpeed Insights — Google Developers HTML script async Attribute  - This might have also worked but look at later. javascript - load jquery after the pa

At the Start of My C# Research

This article is a list of resources that I used way back at the start of my career with C#. Since there are a lot of C# tutorials already out I just wanted to write out some of my experiences and topics that I was curious to learn when starting out. The main reason why I wanted to used C# for programming was for Asp.net MVC applications and toward the second year I discovered XNA. Getting Ready at the Start!     If you're a Java Developer the  using Statement  is much like a import and include in C++. Having experience with both languages doesn't hurt and speaking from my own experiences with both languages, C# is probably the easiest compared to all of them. And for multiple reasons, but mostly because of Visual Studio's Intellisense in my opinion.  C# language itself Random resources that I used, for multiple projects. Visual C# Resources Delegates Tutorial C# Short Type  - Sometimes its just good to compare  ( Java , C++ ) . Creating Custom Routes

HTML Select Placeholder

Update     Adding a selected and disabled attribute works as well and doesn't require any javascript, however refreshing the page does not reset the value. Doing a hard refresh does reset the value (for firefox) . However there seems to be a placeholder attribute in draft (as of november 2014).  " When there is no default option, a placeholder can be used instead". However in the example the placeholder value is still selectable after a choice has been made. This may not be what you want, so combining the two attribute and the javascript below  guaranty the behavior I'm looking for.  I could even support older browser with a little work.     The Purpose of this article is to make a placeholder in select that should help prevents bad selections with and make it easier to validate if no selection is made. In this article I will assume you have Jquery and the Jquery Validation plugin installed on your web application and similar html code displayed like the the fo

Flash Videos not in full view for the Chrome Browser

Image
     For a while I had issues with Adobe Flash in the Chrome Browser, immediately my assumption was that I had a incompatibility issue with Adobe Flash. So I started installing older version  of Adobe Flash from   11.9.900.170 and back on Window Plateforms.  This did not help so I soon started my research which I did not bother to install older versions of Chrome since it had never been a problem before.  Resources (weren't helpful) No video in full-screen mode | Flash Player Adobe - Flash Player Adobe Community: Full Screen Mode is not working for adobe flash player Full screen mode - YouTube Help Adobe - Flash Player : Help - Display Settings My Solution     Turns out my problem wasn't caused by an update but by me and my playing around with settings. Which I never took into consideration since I don't often watch videos in Flash. If I can help it I will watch Youtube videos in HTML5. Also I was at the time of playing with things look for ways to improve

My Introduction to TeamCity

    The purpose of this article is simply to record and document my experiences using Teamcity. I know later down the road I will have a lot more questions about TeamCity but for now just I wanted to write down what I already know and to describe some of the ways that I use it.     I first was introduced to TeamCity in June 2013, where it was setup to automate builds and stared builds based the changes in SVN. Using this setup on daily basis, I could see my commits and others as well. Depending on if it was developing or production code teamcity would build code accordingly and put those changes in a Pending state (or Build Queues). Much like TFS, TeamCity allows me to see the history of changes and who has committed what. One thing I liked the most was that TeamCity would not publish builds that failed. Which was a critical step when developing, especially when pushing to prod  since it gave me a quick double check before going live with my code. Future Questions      Down the r

My Introduciton to Nodejs

Image
Introduction  Much of the material here is based on the chapter 8 in the book:  Programming in HTML5 with Javascript and CSS3  and the  Nodes.js site . Getting started with Nodes.js "Nodes.js is built on the Google Chrome Javascript runtime" "The Platform implements an event-driven, non-blocking I/O model and is lightweight and efficient." "data-intensive,real-time applications that run across distributed devices." "executes your Javascript by using Google's V8 virtual machine" Download  Nodes.js and install, need to accept the licensing agreements.  HelloWorld.js var http= require('http') //" http module is a core built-in, low-level module highly optimized." http.createServer(function (request, response) { response.writeHead(200, {'Content-Type':'text/plain'}); response.end('Hello World from Nodes.js!\n'); console.log('Handled request'); }).listen(8080, '

MVC Excel Email Attachment with NPOI

    The First Question I had after successfully creating a Excel sheet was  how do I create an attachment from a stream?  A second to be more specific was  how do I add an attachment to an email using System.Net.Mail?  Ultimately I wanted to have the  Excel Exports in C# using NPOI  but I started small and thankfully others had already asked and answered these questions. After which was just a matter of knowing  What the correct content-type for excel files was? First Attempt MailMessage mail = new MailMessage(); HSSFWorkbook workbook = CreateExcel(OrderId); MemoryStream ms = new MemoryStream(workbook.GetBytes()); mail.Attachments.Add(new Attachment(ms, "example.xls", "application/vnd.ms-excel")); _emailService.SendEmail("example@example.com", "Email test", "Testing 123"); Changed it to.. MemoryStream ms = new MemoryStream(); workbook.Write(ms); This was based on the QA " NPOI -

MVC Data Exported to Excel with NPOI

This is an article for just writing an Excel file using  NPOI  and I want the quickest and easiest way to export a excel file from Asp.net MVC. To keep everything in work fluid motion I will keep the user on the same page and do a forced download within that page. This is a setup that I have seen in multiple times and I think works great in today's modern website designs. Creates excel files Leniel Macaferi's blog: Creating Excel spreadsheets .XLS and .XLSX in C# Create Excel Spreadsheets Using NPOI var workbook = new HSSFWorkbook(); var ExampleSheet = workbook.CreateSheet("Example Sheet"); var rowIndex = 0; var row = ExampleSheet.CreateRow(rowIndex); row.CreateCell(0).SetCellValue("Example in first cell(0,0)"); rowIndex++; Problems I faced XLS is not the same as CVS which is obvious but truthfully I did not know the difference between the two file types (other than their different extensions). So I asked myself what is the  Difference between CS

C# vs. Javascript Foreach

     This article is about a certain style of writing in Javascript that I like use when iterating through an array combined with a foreach which looks something like the following... var someArray = ["1", "2", "3"]; $.foreach(someArray, function(key, value){ console.log(key + " , " + value); });      Ultimately when I tried to take this same concept over to C# the style did not convert over in the exact same way. I found that the temp variable being used to iterate with did not have any values that tracked where it was in place of the iteration. I found myself asking a similar question in  how do you get the index of the current iteration of a foreach loop?  To see what I tried you can look at another person's  problem  where I had attempted in the same manner. Attempting to use the "current" value in the  GetEnumerator()  sadly does not work. Solution      To summarize the answer for this problem the "foreach&

A Static DropDownList for ASP.Net MVC

Image
     When creating a static dropdowns list in Asp.net MVC, I have a two approaches that I like to commonly use. I know there are many ways to achieve this UI structure and I don't consider either one of the following approaches to be the final solution. However for awhile now  I have been using these two approaches  and I think they are  much  simpler  and easier to maintain  compared to other ways that I have seen . Rather than writing out the HTML select tag and all the options I take advantage of the Html Helper Dropdownlist. I avoid model bind since it is static and I don't want create the list outside of the view. I think this would only create more work to maintain and confusion for other coders if they new to my applications.  I did not come up with either solution  completely on my own and I actually forget where I saw them since it did take a while to find these approach in my research.   What's  important to take away in this article is that if you look carefull

Popular posts from this blog

UI-Bootstrap Collapsible Sticky Footer

Installing Windows on Acer chromebook 15 cb3-532

Aspetcore: NLog with Postgresql