tag:blogger.com,1999:blog-23116534554195802222024-03-18T03:33:25.677-04:00Ray's Asp.net BlogAnswers and code snippets from ASP.NET projects (Webforms/MVC/Classic ASP)Unknownnoreply@blogger.comBlogger1790125tag:blogger.com,1999:blog-2311653455419580222.post-92047312188077781652015-10-26T09:44:00.000-04:002015-10-26T09:44:10.909-04:00How to fix issue "Unhandled Exception: System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"<br />
<br />
In the build definition:<br />
Process => Build => Advanced => MSBuild argument <br />
add:<br />
/p:GenerateBuildInfoConfigFile=fals<br />
<div>
<br /></div>
Unknownnoreply@blogger.com6tag:blogger.com,1999:blog-2311653455419580222.post-47018519487010181462015-10-22T15:14:00.001-04:002015-10-22T15:14:15.441-04:00Different encoding systems for "Hello" example: <br />
ANSI<br />
48 65 6C 6C 6F<br />
<br />
Unicode (little-endian) encoding with no BOM.<br />
48 00 65 00 6C 00 6C 00 6F 00<br />
<br />
Unicode (little-endian) encoding with BOM<br />
FF FE 48 00 65 00 6C 00 6C 00 6F 00<br />
<br />
Unicode (big-endian) encoding with no BOM<br />
00 48 00 65 00 6C 00 6C 00 6F<br />
<br />
Unicode (big-endian) encoding with BOM<br />
FE FF 00 48 00 65 00 6C 00 6C 00 6F<br />
<br />
UTF-8 encoding<br />
EF BB BF 48 65 6C 6C 6F<br />
<br />
UTF-7 encoding<br />
2B 2F 76 38 2D 48 65 6C 6C 6F<br />
<br />
<br />
<br />
Reference:<br />
<a href="http://blogs.msdn.com/b/oldnewthing/archive/2004/03/24/95235.aspx">http://blogs.msdn.com/b/oldnewthing/archive/2004/03/24/95235.aspx</a>Unknownnoreply@blogger.com294tag:blogger.com,1999:blog-2311653455419580222.post-78771765861695990352015-10-16T15:17:00.001-04:002015-10-16T15:17:06.517-04:00How to fix issue "The target GatherAllFilesToPublish does not exist"?#1 Option:<br />
Add following tag into project file:<br />
<Target Name="GatherAllFilesToPublish"><br />
</Target><br />
But will output all of source files into web site.<br />
<br />
#2 Option:<br />
Replace<br />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="false"/><br />
To<br />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" /><br />
<br />
Reference:<br />
<a href="http://forums.asp.net/t/1838524.aspx?The+target+GatherAllFilesToPublish+does+not+exist">http://forums.asp.net/t/1838524.aspx?The+target+GatherAllFilesToPublish+does+not+exist</a>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-2311653455419580222.post-79803596745371284922015-10-07T11:00:00.002-04:002015-10-07T11:00:27.072-04:00INTENTION REVEALING INTERFACES from DDDExcerpt from DDD book:<br />
<br />
<br />
"The beauty of objects is their ability to encapsulate all that so that client code is simple and can be interpreted in terms of higher-level concepts.<br />But if the interface doesn’t tell the client developer what he needs to know in order to use the object effectively, he will have to dig into the internals and understand the details. A reader of the client code will have to do that same. Then most of the value of the encapsulation is lost. We are always fighting cognitive overload. If the client developer’s mind is flooded with detail about how a component does its job, his mind isn’t clear to work out the intricacies of the client design. This is true even when the same person is playing both roles, developing and using his own code, because even if he doesn’t have to learn those details, there is a limit to how many factors he can consider at once."<br />
<br />
<br />
It is so true if working on a larger dev team.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2311653455419580222.post-76688545616231747022015-09-24T10:39:00.000-04:002015-09-24T10:39:09.813-04:00Another way to talk about CQRS/Event Sourcing"A more promising model, used in some systems, is to think of a database as an always-growing collection of immutable facts. You can query it at some point in time — but that’s still old, imperative style thinking. A more fruitful approach is to take the streams of facts as they come in, and functionally process them in real-time."<br />
<br />
Turning the database inside-out with Apache Samz<br />
<a href="https://martin.kleppmann.com/2015/03/04/turning-the-database-inside-out.html">https://martin.kleppmann.com/2015/03/04/turning-the-database-inside-out.html</a><br />
<div>
<br /></div>
Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-2311653455419580222.post-10828336259215982672015-09-21T09:33:00.001-04:002015-09-21T09:33:06.338-04:00Covariant and Contravariant Types made simple<a href="https://medium.com/@EdwhardT/covariant-and-contravariant-types-made-simple-4ab6effb031b">https://medium.com/@EdwhardT/covariant-and-contravariant-types-made-simple-4ab6effb031b</a><br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2311653455419580222.post-90811012507174402982015-09-21T09:32:00.001-04:002015-09-21T09:32:35.962-04:00bitbucketFree for small teams + Unlimited private repositories<br />
<a href="https://bitbucket.org/">https://bitbucket.org/</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2311653455419580222.post-13254132349353681162015-09-15T10:37:00.003-04:002015-09-15T10:37:34.210-04:0012 tips to increase the performance of your ASP.NET application drastically – Part 2<a href="http://www.infragistics.com/community/blogs/brijmishra/archive/2015/08/21/12-tips-to-increase-the-performance-of-asp-net-application-drastically-part-2.aspx">http://www.infragistics.com/community/blogs/brijmishra/archive/2015/08/21/12-tips-to-increase-the-performance-of-asp-net-application-drastically-part-2.aspx</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2311653455419580222.post-25624013822587172312015-09-14T09:21:00.000-04:002015-09-14T09:21:07.898-04:00How to swap two numbers without third variable? int first,second ;<br />
first = 1;<br />
second = 2;<br />
first = first + second;<br />
second = first - second;<br />
first = first - second;Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2311653455419580222.post-49798476561568883182015-08-14T11:20:00.002-04:002015-08-14T11:20:25.489-04:00Practicing Programming <a href="https://sites.google.com/site/steveyegge2/practicing-programming">https://sites.google.com/site/steveyegge2/practicing-programming</a><br />
<br />
Practicing to make skills better, no problem, but many Programming technologies are going away all the time.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2311653455419580222.post-5470137693338658722015-08-10T10:56:00.000-04:002015-08-10T10:56:00.568-04:00Architects Should Code: The Architect's MisconceptionArchitecture Spike<br />
<br />
The architect could lead a development spike focused on architectural discovery or delivery. A spike is a functional, proof of concept implementation for some aspect of the architecture used to identify or mitigate risk by exploring a new technology.<br />
<br />
<a href="http://www.infoq.com/articles/architects-should-code-bryson?utm_source=reddit&utm_medium=link&utm_campaign=external">http://www.infoq.com/articles/architects-should-code-bryson?utm_source=reddit&utm_medium=link&utm_campaign=external</a><br />
<br />
<br />
<div>
<br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2311653455419580222.post-41051650629046735852015-08-06T11:20:00.000-04:002015-08-06T11:20:10.386-04:00Moving Fast With High Code Quality<a href="https://engineering.quora.com/Moving-Fast-With-High-Code-Quality">https://engineering.quora.com/Moving-Fast-With-High-Code-Quality</a><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://qph.is.quoracdn.net/main-qimg-5f29964e3a61ba96b6ddb27d2283cec5?convert_to_webp=true" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="255" src="https://qph.is.quoracdn.net/main-qimg-5f29964e3a61ba96b6ddb27d2283cec5?convert_to_webp=true" width="320" /></a></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2311653455419580222.post-33783107641293938942015-08-04T15:54:00.002-04:002015-08-04T15:54:39.177-04:00How to solve log4net not writing into database problem log4net not writing into database problem<br />
Turn on debug, no problem found. At last, change bufferSize from 400 to 1<br />
<bufferSize value="1" /><br />
Everything is working fine.<br />
<br />
<br />
References:<br />
http://stackoverflow.com/questions/756125/how-to-track-down-log4net-problems<br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2311653455419580222.post-30784774005895000862015-07-30T10:54:00.001-04:002015-07-30T10:54:48.520-04:00How to compare two tables schema by SQL query in MS SQL?How to compare two tables schema by SQL query in MS SQL?<br />
SELECT name,system_type_id,user_type_id,max_length,precision,scale,collation_name,is_nullable into #Tablescehma1<br />
FROM sys.columns WHERE object_id = OBJECT_ID('TABLE1')<br />
<br />
SELECT name,system_type_id,user_type_id,max_length,precision,scale,collation_name,is_nullable into #Tablescehma2<br />
FROM sys.columns WHERE object_id = OBJECT_ID('TABLE2')<br />
<br />
select * from #Tablescehma1<br />
except<br />
select * from #Tablescehma2<br />
<div>
<br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2311653455419580222.post-9277230232153472312015-07-29T10:09:00.003-04:002015-07-29T10:09:50.091-04:00Git Cheat sheet<a href="http://itmyhome.com/git-sheet/">http://itmyhome.com/git-sheet/</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2311653455419580222.post-79012829836456967752015-07-28T09:23:00.002-04:002015-07-28T09:23:24.894-04:00C# Algorithms source code <a href="https://github.com/aalhour/C-Sharp-Algorithms">https://github.com/aalhour/C-Sharp-Algorithms</a><br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2311653455419580222.post-91973215590471848802015-07-27T10:34:00.003-04:002015-07-27T10:34:31.624-04:00Secondary skills for software engineersSecondary skills for software engineers<br />
<a href="http://radek.io/2015/07/27/secondary-skills-for-software-engineers/">http://radek.io/2015/07/27/secondary-skills-for-software-engineers/</a><br />
<br />
What are the most important skills?<br />
1. Language(s)<br />
2. Problem<br />
3. Naming<br />
4. Communication<br />
??Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2311653455419580222.post-26162310571433646762015-07-23T11:36:00.002-04:002015-07-23T11:36:30.510-04:00In ASP.NET Logout: GET or POST?In ASP.NET Logout: GET or POST?<br />
<br />
I just switch from POST to GET, and tested in Chrome, no problem found for now<br />
Suggestion from Stackoverflow<br />
<a href="http://stackoverflow.com/questions/3521290/logout-get-or-post">http://stackoverflow.com/questions/3521290/logout-get-or-post</a><br />
<div>
<br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2311653455419580222.post-72117283775996609292015-07-22T11:42:00.003-04:002015-07-22T11:42:21.247-04:00What’s New in the IDE 2015<a href="http://blogs.msdn.com/b/visualstudio/archive/2015/07/21/visual-studio-2015-rtm-what-s-new-in-the-ide.aspx">http://blogs.msdn.com/b/visualstudio/archive/2015/07/21/visual-studio-2015-rtm-what-s-new-in-the-ide.aspx</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2311653455419580222.post-31708882029613212702015-07-21T09:29:00.002-04:002015-07-21T09:29:46.539-04:00.NET Framework 4.6.NET Framework 4.6<br />
<a href="http://blogs.msdn.com/b/dotnet/archive/2015/07/20/announcing-net-framework-4-6.aspx">http://blogs.msdn.com/b/dotnet/archive/2015/07/20/announcing-net-framework-4-6.aspx</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2311653455419580222.post-39174569134831752672015-07-20T09:00:00.002-04:002015-07-20T09:00:20.565-04:00code golf<h3 style="background-color: white; color: #222222; font-family: Georgia, Utopia, 'Palatino Linotype', Palatino, serif; margin: 0px; position: relative;">
<a href="http://blog.zmxv.com/2015/07/code-golf-at-google.html">http://blog.zmxv.com/2015/07/code-golf-at-google.html</a></h3>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2311653455419580222.post-63391758442972645372015-07-17T10:12:00.002-04:002015-07-17T10:12:57.529-04:00Mostly adequate guide to functional programming<a href="http://drboolean.gitbooks.io/mostly-adequate-guide/content/">http://drboolean.gitbooks.io/mostly-adequate-guide/content/</a><br />
<br />
Introduce functional programming by JavaScriptUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-2311653455419580222.post-60360090097156133742015-07-15T09:59:00.000-04:002015-07-15T09:59:02.189-04:00The anatomy of a credit card formVery detailed design for Credit Card payment<br />
<br />
<a href="https://medium.com/user-experience-design-1/the-anatomy-of-a-credit-card-payment-form-32ec0e5708bb">https://medium.com/user-experience-design-1/the-anatomy-of-a-credit-card-payment-form-32ec0e5708bb</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2311653455419580222.post-90056634830908205132015-07-14T10:27:00.002-04:002015-07-14T10:27:15.787-04:00Session in ASP.NET 5<a href="http://www.exceptionnotfound.net/session-in-asp-net-5/">http://www.exceptionnotfound.net/session-in-asp-net-5/</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2311653455419580222.post-88247039656611593812015-06-15T09:45:00.002-04:002015-06-15T09:45:18.338-04:00Long sentence<br />
<a href="http://yarchive.net/blog/long_sentences.html">http://yarchive.net/blog/long_sentences.html</a><br />
<br />
Long sentence =><br />
complicated sentence =><br />
- Need to remember context<br />
- Not to extend and repeat previsoue ideaUnknownnoreply@blogger.com0