http://stackoverflow.com/questions/22424240/how-to-split-ng-repeat-into-batches
Wednesday, September 24, 2014
Saturday, September 20, 2014
programming-achievements-how-to-level-up-as-a-developer
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer/
Sunday, September 14, 2014
Automapper for complex type
For simple object mapping I think Automapper is fine. For example
Mapper.CreateMap() // i tried to include count here for pricing but it didn''t worked.
var products = productRepository.GetAll().ToList();
List productModelList = new List();
Mapper.Map,
IEnumerable>(products, productModelList);
return productModelList;
Now, I want to include Minimum price of the product from a list of collection in product. So I couldn't use AutoMapper and modified my changes as below. (I know we can use MapFrom for Member. However, it didn't worked initially. )
products.ForEach(product => new
{
var pricingCollection = product.PricingCollection.ToList();
productModelList.Add(new ProductModel()
{
ProductId = product.ProductId,
Name = product.Name,
PriceCount = pricingCollection.Count(),
Price = pricingCollection.Min(x => x.Price)
});
});
After some thoughts and search.. I found what mistake I was making in Object Mapper and modified my CreateMap. Iniitally I was not using the o.MapFrom properly for PricingCollection here
Here is my working code,
Mapper.CreateMap()
.ForMember(x => x.Price, o => o.MapFrom(x => x.PricingCollection.Min(y=> y.SpecialPrice)))
.ForMember(x => x.StoresCount, o => o.MapFrom(x => x.PricingCollection.Count()));
Mapper.CreateMap
var products = productRepository.GetAll().ToList
List
Mapper.Map
IEnumerable
return productModelList;
Now, I want to include Minimum price of the product from a list of collection in product. So I couldn't use AutoMapper and modified my changes as below. (I know we can use MapFrom for Member. However, it didn't worked initially. )
products.ForEach(product => new
{
var pricingCollection = product.PricingCollection.ToList
productModelList.Add(new ProductModel()
{
ProductId = product.ProductId,
Name = product.Name,
PriceCount = pricingCollection.Count(),
Price = pricingCollection.Min(x => x.Price)
});
});
After some thoughts and search.. I found what mistake I was making in Object Mapper and modified my CreateMap. Iniitally I was not using the o.MapFrom properly for PricingCollection here
Here is my working code,
Mapper.CreateMap
.ForMember(x => x.Price, o => o.MapFrom(x => x.PricingCollection.Min(y=> y.SpecialPrice)))
.ForMember(x => x.StoresCount, o => o.MapFrom(x => x.PricingCollection.Count()));
http://platformed.info/why-business-models-fail-pipes-vs-platforms/
why-business-models-fail-pipes-vs-platforms
I am one of the richest man in the world...
I am one of the richest man in the world...When I am self satisfied, irrespective of accomplishment of my dreams .
I may be the poorest, when I don't take any action for my dreams.
I can't print currency,
I can't print currency, so that everyone will use my money.. But, I can develop consumer based software applications, which can earn or save money for people :)
Tuesday, September 9, 2014
The type initializer for 'System.Web.Http.GlobalConfiguration' threw an exception ASP.NET MVC5 Upgrade
I upgraded my recent project to include Authentiacation using OWIN and so changed my framework assemblies to web api 2 compatible/ MVC5. The following issue ruined my day
The type initializer for 'System.Web.Http.GlobalConfiguration' threw an exception.
System.TypeInitializationException was unhandled by user code
HResult=-2146233036
Message=The type initializer for 'System.Web.Http.GlobalConfiguration' threw an exception.
Source=System.Web.Http.WebHost
TypeName=System.Web.Http.GlobalConfiguration
StackTrace:
at System.Web.Http.GlobalConfiguration.get_Configuration()
at VOnline.VBuy.Web.MvcApplication.RegisterAutoFacComponents() in d:\LocalRepository\VBuy\VOnline.VBuy\VOnline.VBuy\Global.asax.cs:line 50
at VOnline.VBuy.Web.MvcApplication.Application_Start() in d:\LocalRepository\VBuy\VOnline.VBuy\VOnline.VBuy\Global.asax.cs:line 23
InnerException: System.FieldAccessException
HResult=-2146233081
Message=Attempt by method 'System.Web.Http.GlobalConfiguration..cctor()' to access field 'System.Web.Http.GlobalConfiguration.CS$<>9__CachedAnonymousMethodDelegate2' failed.
Source=System.Web.Http.WebHost
StackTrace:
at System.Web.Http.GlobalConfiguration..cctor()
InnerException:
I tried a lot of options mentioned in various sites like including Cors of webapi and also MVC, re installed nuget packages after deleting etc.. and finally the below fix solved the issue.
Issue resolved:- System.Web.Http.WebHost is still pointing to old dll, I found it when debugging. I should have found this earlier, but as the issue happned after lot of migrations like
inclusion of Owin startup file etc.. got confused on what might have caused the issue.
I had Microsoft.ASP.NET.WebApi 2.2 already. However, reintalling the same after a clean did the trick.
The type initializer for 'System.Web.Http.GlobalConfiguration' threw an exception.
System.TypeInitializationException was unhandled by user code
HResult=-2146233036
Message=The type initializer for 'System.Web.Http.GlobalConfiguration' threw an exception.
Source=System.Web.Http.WebHost
TypeName=System.Web.Http.GlobalConfiguration
StackTrace:
at System.Web.Http.GlobalConfiguration.get_Configuration()
at VOnline.VBuy.Web.MvcApplication.RegisterAutoFacComponents() in d:\LocalRepository\VBuy\VOnline.VBuy\VOnline.VBuy\Global.asax.cs:line 50
at VOnline.VBuy.Web.MvcApplication.Application_Start() in d:\LocalRepository\VBuy\VOnline.VBuy\VOnline.VBuy\Global.asax.cs:line 23
InnerException: System.FieldAccessException
HResult=-2146233081
Message=Attempt by method 'System.Web.Http.GlobalConfiguration..cctor()' to access field 'System.Web.Http.GlobalConfiguration.CS$<>9__CachedAnonymousMethodDelegate2' failed.
Source=System.Web.Http.WebHost
StackTrace:
at System.Web.Http.GlobalConfiguration..cctor()
InnerException:
I tried a lot of options mentioned in various sites like including Cors of webapi and also MVC, re installed nuget packages after deleting etc.. and finally the below fix solved the issue.
Issue resolved:- System.Web.Http.WebHost is still pointing to old dll, I found it when debugging. I should have found this earlier, but as the issue happned after lot of migrations like
inclusion of Owin startup file etc.. got confused on what might have caused the issue.
I had Microsoft.ASP.NET.WebApi 2.2 already. However, reintalling the same after a clean did the trick.
It's Been Sometime I wrote any technical Blog.. Trying to catch up the same, while developing my new SPA application
It's been sometime (almost 3 years) I wrote any blog, as I was busy with software development for a health care BI domain as well busy with my Marriage, birth of my kid, along with minor family issues in native and solving real world issues like Sewage treatment plants, handling many of the Apartment complex issues, and inclusion of many new facilities in my apartment complex with different set of people working as a team. (Entrepreneurs, housewife's, retd professionals, professors, govt officials and more.. ) and also handling skilled and un-skilled labors.
Trying to catch up writing new blogs, while developing my new SPA using Angular JS on my own (as a single developer, product manager, User experience, Front end development, Db administration, Data loading, Oauth and financier and much more.. ). I am not sure about any revenue from it. But Enjoying the WORK.
Things are evolving.. Almost 10 years back started with Microsoft .NET technologies by developing a .NET Testing tool in console/windows application as a college project in NeST Cyber Campus , Trivandrum.. Then slowly started developing custom ASP.NET controls like Scheduler, Grid Grouping Control, Usercontrol support for the Grid Grouping Control, AJAX for all web controls in Syncfusion even before .NET 2.0 release, refreshing grid, useful for stock quotes on the top of the GridModel of Syncfusion Inc. Moving in to huge enterprise Sales quoting system development in ASP.NET, SQL with Object hierarchy and rules engine for a big telecom client and then worked on in -house developed BI product by Sryas as well as Microsoft BI tools like SSIS, SSAS , SSRS in addition to getting BI reports integration from Tally & many other product integration as prototype. Also worked on timelive (bought and customized) and SharePoint projects internally used by the engineers. Then joined IBM, for the brand :). Nice to work on ASP.NET MVC as well ASP.NET proj and maintenance for asp project :) . Then moved in to Business Intelligence SAAS product development for healthcare domain, used by more than 800 hospitals , as it is a pure technology company again good exposure on technical front and many more performance enhancements in SQL and as well as handling more analytics again. Some of the features implemented as feature lead was game changers (selling points).
On the Functional front, getting an opportunity to manage the entire product development of various software products for more than a year was a challenging opportunity and interacting with Ukraine, US and India for completion with daily nightly build, turned in to only 4 hours sleep per day and even I plan on Sunday for the entire next week task for everyone (almost 12 dev + 1 testing lead, + Ukraine team work orders). Even handled submitting proposals for some of the project with schedule and plan. Handled Pre-Sales as well during the proposal submission. Handling release management for the SAAS model health care Business Intelligence product is as challenging as others as it involves process streamlining as well as planning monthly release, and managing the entire project.
Working with some of the equivalently well/top technical talents was great experience!. Also glad that I was able to train and help some people during the last 10 years, which helps in their career. :)
Thankful to god as every opportunity was created by god. With little hard work I was able to gain some skills.
Trying to catch up writing new blogs, while developing my new SPA using Angular JS on my own (as a single developer, product manager, User experience, Front end development, Db administration, Data loading, Oauth and financier and much more.. ). I am not sure about any revenue from it. But Enjoying the WORK.
Things are evolving.. Almost 10 years back started with Microsoft .NET technologies by developing a .NET Testing tool in console/windows application as a college project in NeST Cyber Campus , Trivandrum.. Then slowly started developing custom ASP.NET controls like Scheduler, Grid Grouping Control, Usercontrol support for the Grid Grouping Control, AJAX for all web controls in Syncfusion even before .NET 2.0 release, refreshing grid, useful for stock quotes on the top of the GridModel of Syncfusion Inc. Moving in to huge enterprise Sales quoting system development in ASP.NET, SQL with Object hierarchy and rules engine for a big telecom client and then worked on in -house developed BI product by Sryas as well as Microsoft BI tools like SSIS, SSAS , SSRS in addition to getting BI reports integration from Tally & many other product integration as prototype. Also worked on timelive (bought and customized) and SharePoint projects internally used by the engineers. Then joined IBM, for the brand :). Nice to work on ASP.NET MVC as well ASP.NET proj and maintenance for asp project :) . Then moved in to Business Intelligence SAAS product development for healthcare domain, used by more than 800 hospitals , as it is a pure technology company again good exposure on technical front and many more performance enhancements in SQL and as well as handling more analytics again. Some of the features implemented as feature lead was game changers (selling points).
On the Functional front, getting an opportunity to manage the entire product development of various software products for more than a year was a challenging opportunity and interacting with Ukraine, US and India for completion with daily nightly build, turned in to only 4 hours sleep per day and even I plan on Sunday for the entire next week task for everyone (almost 12 dev + 1 testing lead, + Ukraine team work orders). Even handled submitting proposals for some of the project with schedule and plan. Handled Pre-Sales as well during the proposal submission. Handling release management for the SAAS model health care Business Intelligence product is as challenging as others as it involves process streamlining as well as planning monthly release, and managing the entire project.
Working with some of the equivalently well/top technical talents was great experience!. Also glad that I was able to train and help some people during the last 10 years, which helps in their career. :)
Thankful to god as every opportunity was created by god. With little hard work I was able to gain some skills.
Subscribe to:
Comments (Atom)