tag:blogger.com,1999:blog-44609358104676234132024-03-14T05:50:29.461+00:00C Sharp LogsRandom tech stuff, mostly related to C# and Microsoft .NET, but not only...csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.comBlogger138125tag:blogger.com,1999:blog-4460935810467623413.post-44079163721799991602020-01-23T18:33:00.004+00:002020-01-23T18:33:30.975+00:00Stylecop ignore folder migrations of Entity Framework and ef core<br />I wanted to stop Stylecop from flagging errors in the migrations folder for Entity Framework, in the end, I managed to do this by including a .editorconfig file inside the Migrations folder with contents as below. In theory, the generated_code = true, but in my case, I found that I had to specify the rule explicitly.<br />
<br />
Should work for all analyzers BTW<br />
<br />
<span style="font-family: "Courier New", Courier, monospace;">[*.cs]<br />generated_code = true<br />dotnet_diagnostic.SA1413.severity = none</span>csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-59995581756551115152018-05-28T13:16:00.001+01:002018-05-28T13:16:41.872+01:00Windows 7 Chrome View Password Manager Vault Crashes Windows PasswordWhen trying to view a saved chrome password in the chrome password manager<br />
<br />
chrome://settings/passwords<br />
<br />
we are prompted to enter our windows password in a normal windows message box, but in that box when we enter the correct password or click cancel, the whole chrome crashes.<br />
<br />
After a lot of searching I found that the solution was to create a shortcut for chrome and launch it with flag / option<br />
<br />
--disable-features=CredUIPromptForWindowsCredentials<br />
<br />
in the shortcut target<br />
<br />
This caused a different popup window to come up for the password, and this one actually works<br />
<br />
I hope this helps someone elsecsloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-55769227158861276962015-02-09T11:06:00.002+00:002018-05-28T13:10:11.945+01:00Very good Regular Expressions (RegEx) tutorialThe best I found on the web so far for learning or refreshing RegEx knowledge:<br />
<br />
<a href="http://regexone.com/">http://regexone.com/</a><br />
<br />
And a very good site for writing and testing RegExes on the fly:<br />
<br />
<a href="http://www.regexr.com/">http://www.regexr.com/</a><br />
<br />
<br />
<br />csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-772677028280430412014-11-27T10:00:00.002+00:002018-05-28T13:12:12.141+01:00Troubleshooting startup performance issues for Visual Studio.<span style="font-family: "arial" , "helvetica" , sans-serif;">This is a very good blog post about troubleshooting startup performance issues for Visual Studio:</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="http://startbigthinksmall.wordpress.com/2011/11/08/activity-log-profiler-find-out-which-extension-is-slowing-down-your-visual-studio/">http://startbigthinksmall.wordpress.com/2011/11/08/activity-log-profiler-find-out-which-extension-is-slowing-down-your-visual-studio/</a></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">In summary, start VS with the /log flag:</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" /log</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">(11.0 is for VS 2012, will need to be different for other versions of course).</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Also download this xsl file:</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="https://github.com/lcorneliussen/ActivityLogProfiler" rel="nofollow" target="_blank">https://github.com/lcorneliussen/ActivityLogProfiler/raw/master/ActivityLogProfiler.xsl </a></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">and place it into folder:</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">%AppData%\Roaming\Microsoft\VisualStudio\xx.x (version number) </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Then delete the original xsl file ActivityLog.xsl, and make a copy of the downloaded xsl file, then rename that copy as the original (ActivityLog.xsl). We want to keep a copy of the downloaded one, because each VS startup overwrites the .xsl....</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Then open the ActivityLog.xml file with internet explorer and examine the startup information.</span>csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-68025892873476100172014-02-13T18:32:00.002+00:002014-02-13T18:32:27.624+00:00code snippets online<a href="http://codesnippet.research.microsoft.com/">http://codesnippet.research.microsoft.com/</a>csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-52898354182825713342014-02-11T21:00:00.002+00:002014-02-11T21:50:42.989+00:00duplicate code detectionThis seems like a stable project in working condition, it is worth a test.
<a href="http://sourceforge.net/projects/pmd/">http://sourceforge.net/projects/pmd/</a>
<br />
<br />
Another one that produces fancy graphs, but probably requires more reading of the documentation in order to actually understand what the output means <a href="http://www.ccfinder.net/ccfinderxos.html">http://www.ccfinder.net/ccfinderxos.html</a><br />
<br />
Also interesting tool to try is the successor to <a href="http://research.microsoft.com/en-us/projects/Pex/" target="_blank">Microsoft Labs PEX</a>, Microsoft <a href="http://visualstudiogallery.msdn.microsoft.com/fb5badda-4ea3-4314-a723-a1975cbdabb4" target="_blank">CodeDigger</a><br />
<br />
<a href="http://chesstool.codeplex.com/documentation" target="_blank">Microsoft CHESS tool for concurrency testing</a>csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-31281815667915222272013-12-23T19:54:00.002+00:002013-12-23T19:54:29.172+00:00Scotts list of utilities - awesome<a href="http://www.hanselman.com/blog/ScottHanselmans2014UltimateDeveloperAndPowerUsersToolListForWindows.aspx">http://www.hanselman.com/blog/ScottHanselmans2014UltimateDeveloperAndPowerUsersToolListForWindows.aspx</a>csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-1562661663222470032013-08-12T23:00:00.001+01:002013-08-12T23:00:57.757+01:00performance comparison ramdisk vs ssdok being the performance freak that I am, I wanted to know how much faster is a ramdisk vs an SSD (if it is at all of course). So I compared my ramdisk running on BondDisk, vs my Samsung 840 Pro (which runs at almost half speed thanks to my laptop having only SATA 2 :/)<br />
<br />
The results leave no room for doubt... ramdisk all the way, for performance critical applications... almost 10 times faster... now if only BondDisk could create a bigger ramdisk...<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-j9DuZgRd-YQ/UglaOMZhFoI/AAAAAAAAAEU/kxQmIF8eVCE/s1600/BondDisk-RamDisk.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-j9DuZgRd-YQ/UglaOMZhFoI/AAAAAAAAAEU/kxQmIF8eVCE/s1600/BondDisk-RamDisk.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Ramdisk (BondDisk)</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-PhRfFrtMG1E/UglaOJ-XSAI/AAAAAAAAAEQ/_Ze8cZ5rwNM/s1600/samsung-840-pro-on-SATA2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-PhRfFrtMG1E/UglaOJ-XSAI/AAAAAAAAAEQ/_Ze8cZ5rwNM/s1600/samsung-840-pro-on-SATA2.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Samsung 840 Pro on SATA2</div>
<br />csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-34002339536951302962013-08-05T21:58:00.001+01:002013-08-05T21:58:57.955+01:00svn 1.8 upgrade working copy So I have decided to update my tortoise svn from 1.7.x to 1.8.1 today, and I couldn't use the working copies as the new client is not backwards compatible. Turns out that I just had to restart my computer to complete the installation (duh) and after that there was a new option available when right clicking on the old format working copy:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-oD9vtmjJmfA/UgARqv3_I0I/AAAAAAAAAD4/jo7yMwkc28c/s1600/svn-upgrade-working-copy-popup.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-oD9vtmjJmfA/UgARqv3_I0I/AAAAAAAAAD4/jo7yMwkc28c/s1600/svn-upgrade-working-copy-popup.png" /></a></div>
<br />
Selecting the first option, shows the following window:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-o60SEZFyA10/UgARy20Qd6I/AAAAAAAAAEA/SoTfJ5mid9U/s1600/svn-upgrade-working-copy-selection.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-o60SEZFyA10/UgARy20Qd6I/AAAAAAAAAEA/SoTfJ5mid9U/s1600/svn-upgrade-working-copy-selection.png" /></a></div>
<br />
All we have to do is to choose the first option, and our old working copy is upgraded to the new 1.8.x format.<br />
<br />
Please note that this is a one way operation, so once you upgrade you can't go back to 1.7.x<br />
<br />
Happy codingcsloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-61635896024345518292013-08-02T19:39:00.000+01:002013-08-05T22:01:26.592+01:00move avira logfile locationso since it seems impossible to move the file location (means change the settings in avira that determine where the logfiles is located by default), and I have an SSD that I want to protect from too many writes, I am using my ramdisk on drive Z:<br />
<br />
first I had to stop avira real time scan, and create the directory z:\temp\avira\logfiles<br />
<br />
then I moved all the files from the default avira logs directory C:\ProgramData\Avira\AntiVir Desktop\LOGFILES to the ramdisk folder<br />
<br />
then I deleted the default avira logfile location, and created a symbolic link instead:<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">mklink /D "C:\ProgramData\Avira\AntiVir Desktop\LOGFILES" z:\temp\avira\logfiles</span><br />
<br />
This seems to work and I don't see many avira logfile writes in process monitor any more.<br />
<br />
Would have been possible to move the windows temp folder setting to the ramdisk, but then we would have to keep backing this up on hard disk at shut down (or even periodically if we are afraid of power cut), so that the contents don't get lost between restarts, and we don't really want to do that, as it would add many more disk writes and would slow down the system in general, especially during start up and shut down.<br />
<br />
PS: I had to modify my ramdisk to always load a fixed image at start up, which contains the above path. Otherwise, at initialisation, the ram drive is always empty, and then avira can't find its temp file, which means it can't start its real time scanner.csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-40663271413343498382013-07-28T19:03:00.000+01:002013-07-28T19:15:43.992+01:00Asus X52F laptop overheating clean fan and speakers losing sound when laptop gets hot but headphones still playing back soundBefore cleaning:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-UiihgFLeeS8/UfVd2ds_0UI/AAAAAAAAADg/97I-FpdQ9wg/s1600/before.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="187" src="http://3.bp.blogspot.com/-UiihgFLeeS8/UfVd2ds_0UI/AAAAAAAAADg/97I-FpdQ9wg/s640/before.png" width="640" /></a></div>
<br />
<br />
After cleaning:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-14bN8yU_yCI/UfVeBjh6bAI/AAAAAAAAADo/2_AHJh90d48/s1600/after.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="214" src="http://2.bp.blogspot.com/-14bN8yU_yCI/UfVeBjh6bAI/AAAAAAAAADo/2_AHJh90d48/s640/after.png" width="640" /></a></div>
<br />
<br />
It's been a while since I made a post... well, I've been busy plus I didn't have anything interesting worth bloging about... but this time it's different.<br />
<br />
I've had this Asus X52F laptop for almost 1 year and 9 months now. It's been performing quite well despite being based on an intel core i3, which by todays standards is a bit underpowered.<br />
<br />
I did upgrade the memory from 4 to 8 GB last year as it was very cheap, easy, and definitely worth it, as I saw noticeable improvement in performance. I am using half a gig as a ramdisk with the excellent <a href="http://www.bonddisc.com/" target="_blank">Bond Disk</a> (I just wish it had the ability to use a bit more... ). Still, the ramdisk is used as temp directory, also stores the firefox cache and profile, and a few other temporary files as needed.<br />
<br />
I also have a permanent 8 GB memory card in the memory card reader, half of which I use for ready boost, and the other half is spare - I am not really using it for anything, but it's there as a fast memory if needed.<br />
<br />
Now to the core of the problem, and the solution. The laptop has been overheating for quite some time now, yet, I had not managed to find an easy way to resolve this problem. I did open the back a couple of times and tried to hoover the fan (having stabilised it first with a pencil, so that it does not get destroyed), but this didn't seem to make any noticeable improvement. It just seemed hard to remove or clean. Which it wasn't... So, recently, I decided that I really had to do something about it as it was getting out of hand.<br />
<br />
Also, since a couple of months ago I noticed that the sound of the speakers was getting muted after a few minutes of operation, even though the headphones connected to the jack still managed to playback sound. I believe this was caused by overheating. The other symptom was that when the speakers stopped reproducing sound, if I plugged in the headphones and I removed them again, the sound was back, but only for a few seconds. The same happened if I muted and un-muted the main volume control.<br />
<br />
I must say that this has nothing to do with drivers or settings, I did spend several hours trying all possible solutions and combinations of settings, without success.<br />
<br />
Now back to the overheating problem. First I downloaded the excellent tool <a href="http://www.alcpu.com/CoreTemp/" target="_blank">Core Temp</a>, and the plugin called Core Temp Grapher (in the <a href="http://www.alcpu.com/CoreTemp/addons.html" target="_blank">addons page</a>) - big thanks to the authors of this tool that allows us to log and see temperature and CPU load data over time.<br />
<br />
I set Core Temp to log the temperature data for a couple of days, during normal laptop operation. This means web browsing, some software installation/uninstallation, watching youtube clips and reading documents.The results were pretty bad (I will include graphs and data soon below).<br />
<br />
Then, after a bit of google searching, I came across <a href="http://www.insidemylaptop.com/taking-apart-asus-k52f-laptop/" target="_blank">this awesome detailed guide</a>, explaining how to disassemble several parts of the laptop. I really can't thank the author enough for putting this together, huge kudos.<br />
<br />
In reality, we don't need all those steps, for our purpose of resolving the overheating problem. What we do need is:<br />
<ul>
<li>a small cross screwdriver (Philips)</li>
<li>a couple of toothpicks (cocktail sticks)</li>
<li>some soft paper or a cloth</li>
<li>a vacuum cleaner</li>
<li>Steps 1 to 3 and 9 to 11 from the guide linked above</li>
</ul>
So the process is very simple and does not take more than 5-10 minutes.<br />
<br />
In summary:<br />
<br />
We shut down the laptop<br />
We remove the power supply<br />
We remove the battery (see guide above if you don't know how to do this)<br />
We remove the 5 screws from the back cover, and remove the cover (see guide again if you don't know how to do this)<br />
We then remove the 2 fan screws and the fan cable connector, then the black fan tape, and we remove the fan (see guide, it is very well explained).<br />
<br />
Then, we look at awe at the fan air outlet metal laminates, which most likely are not even visible, cause they are totally covered with a thick layer of dust, which does not allow *<b>any</b>* air to flow out!<br />
<br />
This is where we use the toothpicks to slowly scrape the solidified dust from the metal laminate. We use the hoover (preferably on low setting) to clean up, and if necessary, we use the soft paper or cloth to clean any visible excess dust in the area. We can optionally hold the fan blades still (so that we don't destroy it) and hoover the fan itself.<br />
<br />
Once we are satisfied and have unclogged the air outlet, we put the fan back in place, screw the 2 screws, connect its power cable to the motherboard, then put back the cover, screw the 5 screws, and place the battery back on the laptop. We are ready to connect the main power and go.<br />
<br />
It's been only a few minutes since I did all this, so I will post more details on temperature improvement a bit later, but to give you an idea:<br />
<br />
Before the cleaning the laptop core 0 used to run between 60 and 80 degrees C, under no load to light load, and over 90 with moderate load (this was with balanced or "multimedia" power plan selected). The fan itself was struggling to keep the temperature down, without much success of course as the air outlet was totally blocked. Core 1 was similar though it is always 5-10 degrees less. But here we focus on core 0, the results for core 1 are similar.<br />
<br />
Right now, and with about 1 hour of normal operation again, the temperatures on core 0 are around 40-50 degrees under low to moderate load, even though I am writing this having the laptop on a pillow, which is really bad for airflow. So we can see an improvement of 20-30 degrees, which is <b>huge</b>.<br />
<br />
I sincerely hope this helps someone else who has the same laptop and problem. Within 5-10 minutes and with minimal work, materials, and expertise, you can brink your laptop temperatures down by a lot, which means more comfort in operation, longer life for your components/laptop, also in case your laptop shuts down due to overheating it won't do it any more, and finally, you may even resolve your problem of having the speakers muting the sound when the laptop gets hot.csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-49799388060930411682013-03-01T00:05:00.000+00:002013-03-01T00:05:45.794+00:00PayPal API related linksSDKs <a href="https://www.x.com/developers/paypal/documentation-tools/paypal-sdk-index">https://www.x.com/developers/paypal/documentation-tools/paypal-sdk-index</a><br />
<br />
Main Page: <a href="https://www.x.com/developers/paypal">https://www.x.com/developers/paypal</a><br />
<br />
PayPal Labs integration wizard - not sure how good code this tool produces, but it's worth checking out <a href="https://www.paypal-labs.com/integrationwizard/ecpaypal/main.php">https://www.paypal-labs.com/integrationwizard/ecpaypal/main.php</a><br />
<br />
Getting started with Express Checkout <a href="https://www.x.com/developers/paypal/documentation-tools/express-checkout/integration-guide/ECGettingStarted">https://www.x.com/developers/paypal/documentation-tools/express-checkout/integration-guide/ECGettingStarted</a><br />
<br />
A very good overview of the PayPal API options <a href="http://www.codeproject.com/Articles/42894/Introduction-to-PayPal-for-C-ASP-NET-developers">http://www.codeproject.com/Articles/42894/Introduction-to-PayPal-for-C-ASP-NET-developers</a><br />
<br />
Good tutorial using the web services API <a href="http://blog.effectlabs.com/post/2011/11/07/Paypal-Express-Checkout-with-C-using-Paypal-web-services.aspx">http://blog.effectlabs.com/post/2011/11/07/Paypal-Express-Checkout-with-C-using-Paypal-web-services.aspx</a><br />
<br />
How to view SOAP messages <a href="http://blog.encoresystems.net/articles/how-to-capture-soap-envelopes-when-consuming-a-web-service.aspx">http://blog.encoresystems.net/articles/how-to-capture-soap-envelopes-when-consuming-a-web-service.aspx</a><br />
<br />
Some more paypal SDKs from their Australia site <a href="https://cms.paypal.com/au/cgi-bin/?cmd=_render-content&content_ID=developer/library_download_sdks">https://cms.paypal.com/au/cgi-bin/?cmd=_render-content&content_ID=developer/library_download_sdks</a><br />
<br />
A very simple tutorial that illustrates the basic points, although it does not go to the advanced functionality, but it is useful if we want to get a first feel quickly <a href="http://www.dotnetfunda.com/articles/article928-online-payments-using-paypal-integration-with-aspnet.aspx">http://www.dotnetfunda.com/articles/article928-online-payments-using-paypal-integration-with-aspnet.aspx</a><br />
<br />
<br />
<br />
<br />
<br />
<br />csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-29164089382663107822013-02-24T15:08:00.000+00:002013-02-24T15:08:00.381+00:00encodo coding standards and git quick start guide<a href="http://encodo.com/en/documents.php">http://encodo.com/en/documents.php</a><br />
<br />
very well written, worth a readcsloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-33776019442747508092013-02-19T21:36:00.000+00:002013-02-19T22:02:35.227+00:00RESTful web service with MVC 3 and fiddler for testinggood article here, also showing how to use fiddler to test the web service: <a href="http://www.iwantmymvc.com/rest-service-mvc3">http://www.iwantmymvc.com/rest-service-mvc3</a><br />
<br />
some other good links:<br />
<br />
video 15 min on MVC 2 <a href="http://www.asp.net/mvc/videos/mvc-2/how-do-i/how-do-i-return-json-formatted-data-for-an-ajax-call-in-an-aspnet-mvc-web-application">http://www.asp.net/mvc/videos/mvc-2/how-do-i/how-do-i-return-json-formatted-data-for-an-ajax-call-in-an-aspnet-mvc-web-application</a><br />
<br />
More focus on error handling <a href="http://www.binary-studio.com/2010/4/22/building-a-custom-json-web-service-with-aspnet-mvc">http://www.binary-studio.com/2010/4/22/building-a-custom-json-web-service-with-aspnet-mvc</a><br />
<br />
More focus on AJAX access <a href="http://msprogrammer.serviciipeweb.ro/2011/12/05/jquery-ajax-request-and-mvcdetailed/">http://msprogrammer.serviciipeweb.ro/2011/12/05/jquery-ajax-request-and-mvcdetailed/</a><br />
<br />
Another simple example: <a href="http://juristr.com/blog/2011/08/posting-json-data-to-aspnet-mvc-3-web/">http://juristr.com/blog/2011/08/posting-json-data-to-aspnet-mvc-3-web/</a><br />
<br />
Almost 2 hours long video, haven't watched it yet but should be comprehensive overview <a href="https://www.youtube.com/watch?v=oRhyn45o3qE">https://www.youtube.com/watch?v=oRhyn45o3qE</a><br />
<br />
This one uses the web API <a href="https://www.youtube.com/watch?v=t090py6b0lM">https://www.youtube.com/watch?v=t090py6b0lM</a>csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-42861799256165862212013-02-11T19:06:00.000+00:002013-02-11T19:06:03.468+00:00wiki editor worduse this microsoft addon to be able to save word files for wiki in wikimedia format<br />
<br />
<a href="https://www.microsoft.com/en-us/download/details.aspx?id=12298">https://www.microsoft.com/en-us/download/details.aspx?id=12298</a>csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-23047637029845851962013-02-08T08:44:00.001+00:002013-02-19T21:41:25.901+00:00IoC<a href="https://simpleinjector.codeplex.com/">https://simpleinjector.codeplex.com/</a><br />
<br />
<a href="http://www.palmmedia.de/Blog/2011/8/30/ioc-container-benchmark-performance-comparison">http://www.palmmedia.de/Blog/2011/8/30/ioc-container-benchmark-performance-comparison</a><br />
<br />
<a href="http://stackoverflow.com/questions/21288/which-net-dependency-injection-frameworks-are-worth-looking-into">http://stackoverflow.com/questions/21288/which-net-dependency-injection-frameworks-are-worth-looking-into</a><br />
<br />
<a href="http://www.devtrends.co.uk/blog/how-not-to-do-dependency-injection-the-static-or-singleton-container">http://www.devtrends.co.uk/blog/how-not-to-do-dependency-injection-the-static-or-singleton-container</a><br />
<br />
<a href="https://timross.wordpress.com/2010/01/21/creating-a-simple-ioc-container/">https://timross.wordpress.com/2010/01/21/creating-a-simple-ioc-container/</a><br />
<br />
<a href="http://netmvc.blogspot.co.uk/2012/04/dependency-injection-in-aspnet-mvc-4.html">http://netmvc.blogspot.co.uk/2012/04/dependency-injection-in-aspnet-mvc-4.html</a><br />
<br />
<br />csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-17333782703068244582012-11-30T18:23:00.000+00:002012-11-30T18:23:10.023+00:00some great free icons:<br />
<br />
large variety of 16x16 png files: <a href="http://www.famfamfam.com/lab/icons/silk/">http://www.famfamfam.com/lab/icons/silk/</a><br />
<br />
<br />
Higher quality icons: 256x256 arranged by theme: <a href="http://vistaicons.com/" title="http://vistaicons.com/">http://www.proicons.com/icon_collections.htm</a><br />
<br />
<br />
csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-23734230388723049102012-11-17T13:19:00.002+00:002013-05-25T23:24:57.243+01:00Web page speed check and optimisationThere are at least 3 places where one can check a web page speed, and obtain various recommendations regarding ways to improve page load time:<br />
<br />
<a href="https://developers.google.com/speed/pagespeed/insights" target="_blank">Google Page Speed Insights</a><br />
<br />
<a href="http://yslow.org/" target="_blank">YSlow</a> and <a href="http://developer.yahoo.com/yslow/" target="_blank">here the original yahoo site</a>, with tips on site performance. <a href="https://addons.mozilla.org/en-US/firefox/addon/yslow/" target="_blank">Firefox addon</a> is available too.<br />
<br />
<a href="http://www.webpagetest.org/" target="_blank">Webpagetest</a> which offers the ability to select a different location for the test and different browsers.<br />
<br />
These are certainly useful tools when it comes to web page loading times improvement and optimisation.<br />
<br />
Update: Recently I found the site <a href="http://www.modern.ie/">www.modern.ie</a> which seems quite good for checking for valid pages against various browsers, OSes and devices. Not all the functionality is free, but seems reasonably priced for commercial web sites.csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-53725491826283566002012-09-07T09:52:00.005+01:002012-09-07T09:55:59.912+01:00open source license types in simple EnglishI found 2 articles with simple english explanation of the license types:<br />
<br />
part 1 <a href="http://www.zdnet.com/blog/burnette/howto-pick-an-open-source-license-part-1/130">http://www.zdnet.com/blog/burnette/howto-pick-an-open-source-license-part-1/130</a>[<a href="http://www.zdnet.com/blog/burnette/howto-pick-an-open-source-license-part-1/130" target="_blank" title="New Window">^</a>],<br />
part 2 <a href="http://www.zdnet.com/blog/burnette/how-to-pick-an-open-source-license-part-2/131">http://www.zdnet.com/blog/burnette/how-to-pick-an-open-source-license-part-2/131</a>[<a href="http://www.zdnet.com/blog/burnette/how-to-pick-an-open-source-license-part-2/131" target="_blank" title="New Window">^</a>]<br />
<br />
They are a bit old (since 2006) but these things don't change much over time. Just in case the original articles get lost, I am making a copy here, but for the interested reader, I suggest to read the originals cause they contain useful comments from other readers, and they are the intellectual property of the original author Ed Brunette:<br />
<br />
<br />
<b><span style="font-size: large;">Part 1:</span></b><br />
<div id="main">
<br />
<br />
<article class="post clear" id="siu-container" style="position: relative;"><header class="storyHeader">
<div class="summary">
Summary: If you write some code keep
in mind that it's yours and you get to decide if, how, or under what
circumstances, other people can use it. Let's say you've made the
decision to release your code as "open source". What does that mean,
what is an open source license, and how do you pick the right one? This
question comes up all the time so I thought I'd write up a simple
decision tree to try to explain the choices. </div>
<div class="byline">
<div>
<a class="thumb" href="http://www.zdnet.com/blog/burnette/howto-pick-an-open-source-license-part-1/130"></a></div>
</div>
</header><div class="storyBody">
<br />
You've
made the decision to release your code as "open source". Ok, what does
that mean, what is an open source license, and how do you pick the right
one? This question comes up all the time so I thought I'd write up a
simple decision tree to try to explain the choices.<span class="pullQuote">Many people use GPL without realizing the implications or understanding the other options.</span>
This isn't legal advice, and I'm not a lawyer, and I'm probably
over-simplifying some of the points, but I hope you find it helpful.<br />
First of all, if you write some code, it's your code and you get to decide how other people can use it. Period. <b>Nobody but you</b>
can say how your code can be used, either by putting restrictions on it
or taking them off, without your permission. That's a very important
point to keep in mind while reading this article.<br />
The second point to keep in mind is that <b>nobody but you</b> can even use your code <b>unless you explicitly give them permission</b>. Another way of saying this is that all source code is closed and proprietary and off limits until you, the author, open it.<br />
<blockquote>
Note: The text of all the licenses mentioned here can be found at <a href="http://www.opensource.org/" target="_self">opensource.org</a>.</blockquote>
<b>Decision 1:</b> Do you want to relinquish any control over how your code is used and distributed?<br />
<b>If yes, then</b> don't copyright it, and don't license it. <strike>Put it in the public domain, and <b>you're done</b>.
This is a good choice for examples, templates, and other illustrative
code where the whole point is that you want everybody to feel free to
use what you've written.</strike> <i>[Alert readers pointed out that
"public domain" is is not a good choice because in many jurisdictions
you can't give up your copyright. Use a liberal license like MIT/BSD
instead. -22jun/ebb]</i> Example: code listings in a book or article. <br />
<br />
<b>If no, then</b> Copyright the code (paste copyright notices all over it) and continue with decision 2. <br />
<br />
<blockquote>
Hint: Just to make sure your intent is clear, either put in explicit copyright notices, <strike>or put in explicit notices that the code is in the public domain</strike>. <b>Copyright is how you retain control.</b> Without a copyright, there is no control. <i>[Technically the notices might not be necessary but they don't hurt and are still recommended. -22jun/ebb]</i></blockquote>
<b>Decision 2:</b> Do you want to allow people to use your code in non open-source programs?<br />
<b>If yes, then</b> continue to decision 3.<br />
<b>If no, then</b>
release your code under the GPL, a restrictive "free (libre) software"
license that actively promotes user choice at the expense of direct
commercial interests. For the most part, GPL'd code can only be used
with other GPL'd code, and in fact if you start using <i>[and distributing -22jun/ebb]</i>
some GPL code in a program you wrote then you either have to release
your program under GPL as well or quit using that code. This is why GPL
is sometimes described as "viral". Examples: Emacs, Linux kernel.<br />
<blockquote>
Hint:
Don't take this choice unless you really mean it. Many people use GPL
without realizing the implications or understanding the other options,
and thus lock the code away from a whole segment of potential users, so
please read the rest of the choices first.</blockquote>
<b>Decision 3:</b> If somebody uses your code in their program and sells their program for money, do you want some of that money? <br />
<br />
<b>If yes, then</b> you have two choices. The first choice (3a) is not to release it as open source at all, i.e., use closed source and <b>you're done</b>.
This would preclude anyone from using your code in free (no cost)
packages. And it would only allow people to use your code in commercial
programs if they came to your first and worked out a deal for a
commercial license. Note that even if the source is "closed" you can
give permission if you like for certain people to have access to the
source and use it in limited ways. Example: Microsoft Windows, Sun Java
(sort of).<br />
<br />
The second choice (3b) is <b>dual license</b>.
I'll talk about licenses more in a moment, but dual license just means
you give permission for people to use your code under two or more
licenses. You pick one license (probably GPL) for free (no cost)
programs, and one for commercial ($$$) programs. This is a good choice
if you're trying to make a living off licensing fees for the code
itself. Examples: MySQL, <strike>JBoss</strike>, SleepyCat. Continue to decision 4.<br />
<br />
<b>If no, then</b>
give permission for others to use your code under one or more
"commercial friendly" licenses. This is a good choice if you want your
code to get into as many hands as possible and either you don't care
about the money or you plan to make money in other ways, for example by
selling your own programs that use the code or from consulting or
support. Examples: Apache HTTPD, Eclipse, Firefox. Continue to decision
4.<br />
<br />
<b>Decision 4:</b> If somebody uses <i>[and distributes -22jun/ebb]</i>
your code and improves it (fixes bugs or adds features) do you want to
make them give you the improvements back so you can use them too?<br />
<b>If yes, then</b>
use a "reciprocal" license. Any modifications to your code need to be
made available under the same licensing terms as your original code.
This is useful if you're worried somebody will take your code and go off
on their own private "fork". Examples: Eclipse (EPL), Solaris (CDDL),
and Firefox (MPL). <b>Done.</b><br />
<b>If no, then</b> use a
non-reciprocal license. Often times the people using your code will send
back improvements anyway, especially if you have a history of frequent
releases and they get tired of having to re-merge in their changes every
time. This is the most wide open type of license so it will get you the
most exposure and users, but it can also relegate the original
writer(s) to the sidelines. Example: FreeBSD (BSD). <b>Done.</b><br />
<b><br /></b>
<b><span style="font-size: large;">Part 2:</span></b><br />
<br />
<b><a href="http://creativecommons.org/licenses/publicdomain/" target="_self">Public domain</a> </b><br />
Description:
This isn't really a license at all, but rather a renouncing of any
rights you might have under copyright law. The idea is simple to
understand but gets a little hairy legally. Some say it's not possible
to renounce these rights, some say it depends on the country, some say
that once renounced you can un-renounce them later, and some say it's
perfectly fine. After <a href="http://en.wikipedia.org/wiki/Public_domain" target="_self">reading about it some more</a>, my advice is to punt and and use a BSD/MIT license instead.<br />
Code is protected by copyright? No<br />
Code can be used in closed source projects? Yes<br />
Program that uses <i>(incorporates)</i> the software can be sold commercially? Yes<br />
Source to bug fixes and modifications must be released? No<br />
Provides explicit patent license? No <br />
<br />
<b><a href="http://www.opensource.org/licenses/bsd-license.php" target="_self">BSD</a>/<a href="http://www.opensource.org/licenses/mit-license.php" target="_self">MIT</a></b><br />
Description:
The BSD and MIT licenses are two of the oldest and most liberal
licenses available. They basically put no restrictions on how the
software can be used. These licenses are used by a wide variety of
projects including FreeBSD.<br />
Code is protected by copyright? Yes<br />
Code can be used in closed source projects? Yes<br />
Program that uses <i>(incorporates)</i> the software can be sold commercially? Yes<br />
Source to bug fixes and modifications must be released? No<br />
Provides explicit patent license? No<br />
<br />
<b><a href="http://www.opensource.org/licenses/apache2.0.php" target="_self">ASLv2 (Apache)</a></b><br />
Description:
The Apache license is only slightly more restrictive than the BSD/MIT
licenses. The main thing it adds is some clauses about patent licensing
and termination. You should carefully read all the patent clauses in the
licenses that have them because they all have subtle differences. All
the Apache.org projects use ASL but it's also in wide use outside Apache
(for example Google uses it for GWT).<br />
Code is protected by copyright? Yes<br />
Code can be used in closed source projects? Yes<br />
Program that uses <i>(incorporates)</i> the software can be sold commercially? Yes<br />
Source to bug fixes and modifications must be released? No<br />
Provides explicit patent license? Yes <br />
<br />
<b><a href="http://www.opensource.org/licenses/gpl-license.php" target="_self">GPL (v2)</a></b><br />
Description:
This is a very common license that allows people to freely use your
software as long as they don't charge for it and use the same license
for parts of the program that they wrote themselves. The copyright
holder is not subject to these restrictions. Widely used, but largely
misunderstood. The canonical examples are Linux and MySQL.<br />
Code is protected by copyright? Yes<br />
Code can be used in closed source projects? No* (except by copyright holder)<br />
<i>[*Note:
If GPL code is only used in-house, then the answer is Yes. But if
someone uses the GPL code in a derived work, and distributes the work,
then the answer is No. I'm assuming distribution for this article.
-22jun/ebb]</i><br />
Program that uses <i>(incorporates)</i> the software can be sold commercially? No** (except by copyright holder)<br />
<i>[**Note:
If you take "sold" to mean charge for distributing, charge for bundling
and packaging, charge for reproducing, charge for support, and charge
for indemnification, then the answer is Yes. This is the Linux
distributor model. However if by "sold" you mean "paid a fee for a
license to use" then the answer is No. Working at a commercial software
developer that does charge such fees, the latter definition is most
natural to me, so it's the meaning I'm using for this article.
-22jun/ebb]</i><br />
Source to bug fixes and modifications must be released? Yes <i>[if distributed, see above]</i><br />
Provides explicit patent license? No (but v3 is supposed to address this) <br />
<br />
<b><a href="http://www.opensource.org/licenses/lgpl-license.php" target="_self">LGPL</a></b> <br />
Description:
A derivative of GPL, LGPL includes an exception that is intended to
allow code that is released under other licenses to co-exist with and
call the LGPL code. However this exception is a bit fuzzy legally as
it's currently written, so some businesses shun it. The author of the
license <a href="http://www.gnu.org/licenses/why-not-lgpl.html" target="_self">encourages people not to use it</a>.
Personally I think LGPL is a much better choice than GPL for most
software, but that a more modern license like EPL is often even better.<br />
Code is protected by copyright? Yes<br />
Code can be used in closed source projects? Yes (maybe)<br />
Program that uses <i>(incorporates)</i> the software can be sold commercially? Yes (maybe)<br />
Source to bug fixes and modifications must be released? Yes <i>[if distributed; see notes under GPL]</i><br />
Provides explicit patent license? No <br />
<br />
<b><a href="http://www.opensource.org/licenses/mozilla1.1.php" target="_self">MPL</a>/<a href="http://www.opensource.org/licenses/cddl1.php" target="_self">CDDL</a></b> <br />
Description:
MPL is used by Mozilla, Firefox, and many other projects. CDDL is based
on MPL with a few minor tweaks to make it more applicable outside of
Mozilla. CDDL is used by many Sun products such as Solaris. It's
expected that Java will be open sourced either under the CDDL or (L)GPL.
Note that the patent clauses are not palatable to some businesses, so
you may want to consider EPL instead.<br />
Code is protected by copyright? Yes<br />
Code can be used in closed source projects? Yes<br />
Program that uses <i>(incorporates)</i> the software can be sold commercially? Yes<br />
Source to bug fixes and modifications must be released? Yes <i>[if distributed]</i><br />
Provides explicit patent license? Yes<br />
<br />
<b><a href="http://www.opensource.org/licenses/cpl1.0.php" target="_self">CPL</a>/<a href="http://www.opensource.org/licenses/eclipse-1.0.php" target="_self">EPL</a></b><br />
Description:
CPL was derived from the old IBM Public License and was also influenced
by MPL. CPL was originally used by Eclipse, but that project switched
to EPL. CPL is also used by some Microsoft open source projects on
SourceForge. EPL is a newer version of CPL with some improvements in its
patent language to make it more acceptable to businesses. For example
if there's a patent dispute it will only affect the part of the software
covered by the patent and not the whole thing.<br />
Code is protected by copyright? Yes<br />
Code can be used in closed source projects? Yes<br />
Program that uses <i>(incorporates)</i> the software can be sold commercially? Yes<br />
Source to bug fixes and modifications must be released? Yes <i>[if distributed]</i><br />
Provides explicit patent license? Yes<br />
<b>Dual license</b><br />
Description:
This isn't really a license, it just means making your software
available under two or more different licenses. This is useful in two
circumstances:<br />
<ol>
<li>The license you originally picked isn't
compatible with the license somebody else uses and they want to use your
code (or vice-versa). This is how you get things like
"GPL/LGPL/MPL/EPL" licenses (a quad-license). Then there's no question
that your code can be used in programs that use any of the licenses you
mention.</li>
<li>You want to make your software available without charge
in other free programs, but if somebody is going to make money off of
it then you want a share. The typical example is MySQL. It's licensed
under GPL, but if a different company wants to embed it in their
commercial program then they have to get a different, commercial
license. The copyright holder, of course, can use their own software
however they like. It's this situation that earned GPL the nickname of "<a href="http://www.eclipsezone.com/eclipse/forums/t20922.html" target="_self">The Greedy Programmer's License</a>". See also <a href="http://linux.slashdot.org/comments.pl?sid=133782&cid=11169024" target="_self">this slashdot thread</a>.
Of course, one could argue other licenses like BSD, MIT, and Apache,
are "greedy vendors' licenses". That's one reason I like the pragmatic,
middle-of-the-road licenses like EPL.</li>
</ol>
Note: Normally, only
the copyright holder can re-license the software (for example to issue
commercial licenses). So if multiple people contribute to your project,
you may need to get them to sign some kind of contributor's agreement
that spells out who owns the copyright and what kinds of activities are
allowed. For this you definitely need a lawyer.<br />
<b>Final notes</b><br />
Several
people noted the "anti-GPL slant" of the previous article. I admit I'm
not too fond of the GPL. If people pick GPL on purpose, with full
knowledge of its restrictions and philosophy, that's fine. I just see
too many people pick it when they don't really need to. As one responder
to my original article wrote:<br />
<blockquote>
<span class="a2">If you
think using GPL'ed software in commercial software is "smooth sailing"
you don't understand the license. There are safe situations, but in
everything except the very straightforward cases, you have to understand
more about contract and copyright law that most developers do to know
what is safe and what isn't.</span></blockquote>
Pick what you want, but pick it for the right reasons. And consult a lawyer if you need to cover your assets.</div>
</article></div>
<br />
<br />csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-11268685383450392852012-08-26T15:42:00.001+01:002012-08-28T13:56:08.788+01:00Why Windows 8 won't be a success...I wanted to post about this for a few days now, but never found the time.<br />
<br />
All the hype these days is about the Windows 8 release... lots of lengthy posts all over the internet, and endless debates. My simple and humble opinion is that this new OS by Microsoft will not be well received, for the following reasons:<br />
<br />
1. It tries to cater for the needs of the desktop and the tablet users at the same time. This is not possible with a single user interface, simply because the dimensions of the screen are different, so the use patterns are different. This is the single one and main reason why not only Microsoft, but anyone cannot design one single OS that will be efficient both for tablets and PCs.<br />
<br />
2. The tiled interface is not very efficient for office use, has too high learning curve, so businesses won't be adopters, there goes a huge part of the revenues.<br />
<br />
3. The power users won't be thrilled as a lot of screen space is wasted, so that's another part of the market that won't buy.<br />
<br />
4. Finger interface makes no sense in managing a server remotely.<br />
<br />
5. The screen will get very dirty if you try using it with fingers... I know this reason sounds silly, but doesn't help.<br />
<br />
Under different circumstances, I would say the new OS will be a flop, but given the mighty Microsoft advertising machine which is already at work, I will say that they will manage to convince a few people to buy, and it won't be a total disaster. It might make a few sales in the tablet market, which is clearly its target market, although even there, it has a hurdle to overcome: it is not free (compare this to Android). In any case, I think Windows 8 will go down worse that Vista did.<br />
<br />
On a relevant and a bit more philosophical note, I dare say that the only reason Microsoft is creating this OS is to compete in the tablets market, I mean it is obvious by the UI design that this OS will offer better usability to the tablet users. And at the same time, they try to have the benefit of having to maintain one OS only, for both desktop and tablet users, and the need for applications to be developed for one OS only, this is why they are selling the same OS to desktop/laptop users.<br />
<br />
I believe it would have been better if they made 2 partially different OSes for these 2 different markets, perhaps with the same underlying (i.e. non UI part) core, and then offer 2 different SDKs or UI platforms or whatever, for developing the UI parts of the applications. I think they will realise this and Windows 9 will be based on this model, and it won't be long before it arrives. They just need to see the low sales numbers to be convinced, just as it happened with Vista.<br />
<br />
Personally, I'll skip Windows 8, just as I did with Vista, and I never regretted it. However, everybody has a different taste and I am sure some people will like the new OS, which is perfectly fine. Diversity is always good!csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-83911471363166422912012-08-24T23:50:00.001+01:002012-08-24T23:50:46.722+01:00Cassini ultidev web server SLL failed to register website1 because System.ComponentModel.Win32Exception the operation completed successfullySo today I was setting up the latest Cassini UltiDev web server, version 4.65.0.0. The guys did a good job, the server is easy to use and functional. I used the default website of Microsoft WebMatrix and seemed fine. However, I run into a weird exception, the moment I tried to add an SSL certificate:<br />
<br />
<i>Failed to register Website1 because System.ComponentModel.Win32Exception the operation completed successfully</i><br />
<br />
Well, this doesn't make much sense... how can it fail and succeed at the same time? In any case, the https part of the site was not working. After a bit of digging around, I discovered that it was not registering the certificate with the port. The work around (windows server 2003) was to register this manually, with the command:<br />
<br />
httpcfg set ssl -i 0.0.0.0:443 -h <i>CERTHASHWITHOUTSPACESHERE</i><br />
<i><br /></i>
After that everything was fine. I hope this saves someone some time...csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-65743865725996495862012-08-18T19:10:00.002+01:002012-08-19T07:52:50.605+01:00A very well written summary on Scrum<div>
<br /></div>
This is a very clear <a href="http://stephenwalther.com/archive/2012/08/17/scrum-in-5-minutes.aspx" target="_blank">overview on scrum</a>, by a very knowledgeable author.<br />
<br />
I must note that the book he recommends is a bit old, there are newer ones in the marketplace which could offer more up to date information. I very much like <a href="http://www.apress.com/9781430235330" target="_blank">Pro Agile .NET Development with SCRUM</a> (<a href="http://www.amazon.com/exec/obidos/ASIN/1430235330" target="_blank">also amazon link</a>) because it offers recent (2011) and a hands on real life scenario to the methodology of scrum, TDD, BDD, with the tools developers use in every day work (it is geared towards ASP.NET though, if you use another environment you might not like this part...).<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.amazon.com/exec/obidos/ASIN/1430235330" target="_blank"><img border="0" src="http://2.bp.blogspot.com/-MIT830_6ER8/UDCL61E6sTI/AAAAAAAAADE/jz3NcFf_exc/s1600/512q4ijE01L._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU01_.jpg" /></a></div>
<br />csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-46692100020546815212012-08-18T04:19:00.002+01:002012-08-18T04:19:54.116+01:00how to repair a corrupted .net framework 1.1 installation on a microsoft windows server 2003OK so recently a friend of mine administering a windows server 2003 managed to corrupt his .NET framework installation. I decided to lend him a hand, and after a lot of searching this is what I found out:<br />
<br />
The situation:<br />
<br />
He tried to remove all .NET framework versions in order to install version 4.0. As it turns out, version 1.1 is part of the actual OS, and when he removed it, he didn't remove it completely, some registry key remained there, and the OS was thinking it had a fully working 1.1 version installed. As a result, when trying to reinstall the version 1.1 he was getting a message like "the product you are trying to install has already been installed as part of the OS" or something similar, because windows thought the framework is already installed. Also, any attempt to install any of the later versions of .NET framework were failing, the same when trying windows updates.<br />
<br />
The solution:<br />
<br />
It is outlined very clearly<a href="http://support.microsoft.com/kb/830646" target="_blank"> in this microsoft support page</a>, and it did work. Took me some time to find it, hopefully this post will help someone else find it faster.<br />
<br />
And because microsoft links have a tendency to disappear from time to time, here is the process in summary:<br />
<br />
1. Delete netfx found in the registry:<br />
<br />
<span style="background-color: white; color: #333333; font-family: monospace; font-size: 13px;">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\OC Manager\Subcomponents</span><br />
<br />
2. in C:\Windows\inf make a file, call it sysnew.inf, with contents:<br />
<br />
<br />
<pre class="in_text" style="color: #333333; font-family: Consolas, 'Courier New', Courier, monospace; font-size: 13px; padding: 10px; position: relative; width: auto;">[Version]
Signature = "$Windows NT$"
DriverVer=10/01/2002,5.2.3790.0
[Components]
netfx=netfxocm.dll,UrtOcmProc,netfxocm.inf,,7</pre>
<br />
<br />
3. run this command:<br />
<br />
<span style="background-color: white; color: #333333; font-family: 'Segoe UI', Arial, Verdana, Tahoma, sans-serif; font-size: 13px; font-weight: bold;">sysocmgr /i:C:\windows</span><span style="background-color: white; color: #333333; font-family: 'Segoe UI', Arial, Verdana, Tahoma, sans-serif; font-size: 13px; font-weight: bold;">\inf\sysnew.inf</span><br />
<br />
4. Click next, if it asks for the files, download the SP2 for windows server 2003 (about 380 MB), extract it with 7zip and click browse to the folder i386 you just extracted.<br />
<br />
5. Install assemblies in the global assembly cache (replace xxxx with correct version, in our case was 4322):<br />
<br />
<span style="background-color: white; color: #333333; font-family: 'Segoe UI', Arial, Verdana, Tahoma, sans-serif; font-size: 13px; font-weight: bold;">"</span><span style="background-color: white; color: #333333; font-family: 'Segoe UI', Arial, Verdana, Tahoma, sans-serif; font-size: 13px; font-weight: bold;">C:\windows</span><span style="background-color: white; color: #333333; font-family: 'Segoe UI', Arial, Verdana, Tahoma, sans-serif; font-size: 13px; font-weight: bold;">\Microsoft.NET\Framework\v1.1.</span><var style="background-color: white; color: #333333; font-family: 'Segoe UI', Arial, Verdana, Tahoma, sans-serif; font-size: 13px; font-weight: bold;">xxxx</var><span style="background-color: white; color: #333333; font-family: 'Segoe UI', Arial, Verdana, Tahoma, sans-serif; font-size: 13px; font-weight: bold;">\gacutil.exe" /f /il </span><span style="background-color: white; color: #333333; font-family: 'Segoe UI', Arial, Verdana, Tahoma, sans-serif; font-size: 13px; font-weight: bold;">C:\windows</span><span style="background-color: white; color: #333333; font-family: 'Segoe UI', Arial, Verdana, Tahoma, sans-serif; font-size: 13px; font-weight: bold;">\Microsoft.NET\Framework\v1.1.</span><var style="background-color: white; color: #333333; font-family: 'Segoe UI', Arial, Verdana, Tahoma, sans-serif; font-size: 13px; font-weight: bold;">xxxx</var><span style="background-color: white; color: #333333; font-family: 'Segoe UI', Arial, Verdana, Tahoma, sans-serif; font-size: 13px; font-weight: bold;">\assemblylist.txt</span><br />
<br />
6. Run windows update to get any patches you need, and you should be all set.<br />
<br />
I hope this post saves someone some time...<br />
<br />csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-36381698465175189222012-08-07T20:22:00.000+01:002012-08-07T23:07:52.065+01:00Firefox Memory ManagerOK, for a long time I was not happy with the huge amount of memory used by Firefox. Recently I came across a nice little application, firemin, that can be found here: <a href="http://www.datum-forensics.com/2012/05/firemin/">http://www.datum-forensics.com/2012/05/firemin/</a><br />
<br />
It is quite nice, I tried it for a couple of days. However, I was quite surprised by the huge amount of memory reduction (down to about 1 MB from 300-400 MB or more), and I thought that this does not seem normal, something else must be sacrificed. The point is, the more we reduce the memory used by firefox, the more page faults we will have.<br />
<br />
So I wrote a small C# application to verify this and to check how many page faults I have and how much memory is used by firefox. Then I added a little bit of code to perform a "memory collection" using the EmptyWorkingSet unmanaged function (same as firemin uses), whenever the memory used by firefox reaches a certain limit which we can set. This way we can set the limit to as high as we like (for example 200 MB), depending on the available physical memory in our computer, and avoid the huge amount of page faults we get when firefox memory drops to something like 1 MB... In fact, we could just as easily let the OS handle the whole thing... <br />
<br />
The application works on my system (windows 7) without problems (requires .NET 4.0 client profile). It is nothing extraordinary, and there are tons of things that could be improved on it, from a coding point of view. It is rather a quick hack and a proof of concept than a proper application. <br />
<br />
Still I decided to share it here, so perhaps other people will find it useful, or decide to take the code and improve on it. One thing I was going to add if I had more time would be some real time zedgraph plot of the memory and page faults, I think that would be cool. Currently, the results can be visualised if logging is enabled and then copy/paste the resuts in excel and plot as a 2D graph. Takes a few seconds to do, and looks like this:
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-xuuNoap4TMs/UCFkVF4DlPI/AAAAAAAAACk/eyjqtsuZeaA/s1600/firefoxmemorymanager.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="368" src="http://3.bp.blogspot.com/-xuuNoap4TMs/UCFkVF4DlPI/AAAAAAAAACk/eyjqtsuZeaA/s640/firefoxmemorymanager.png" width="640" /></a></div>
<br />
<br />
Please note, I have not tested it extensively and I cannot be responsible for anything that might go wrong, however, I doubt anything will, in the worst case it will probably just crash itself, as it doesn't try to do anything else other than release the memory... now if you start doing funny things like setting negative memory target and so on... you are on your own :) <br />
<br />
In the application I used coding ideas regarding retrieving process information from a site that I can't remember now (sorry), about EmptyWorkingSet from <a href="http://forums.codeguru.com/printthread.php?t=368990">http://forums.codeguru.com/printthread.php?t=368990</a><br />
<br />
and about a task running in the tray from <a href="http://www.codeproject.com/Articles/18683/Creating-a-Tasktray-Application">http://www.codeproject.com/Articles/18683/Creating-a-Tasktray-Application</a><br />
<br />
(there is a more advanced tutorial on tray applications here <a href="http://www.simple-talk.com/dotnet/.net-framework/creating-tray-applications-in-.net-a-practical-guide/">http://www.simple-talk.com/dotnet/.net-framework/creating-tray-applications-in-.net-a-practical-guide/</a> but for the purposes of this application the first article on codeproject is just fine)<br />
<br />
The application runs by default in the system tray, so you won't see anything the first time you run it. By default, it will monitor memory usage once per second. The default setting is 200 MB to perform a memory collection, and I found that it gets hit quite often with around 20 tabs open... you might want to play around. If you open the application window, you will see something like this:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-XLEpjRNbWoQ/UCFpSq5dKDI/AAAAAAAAAC0/ZNy24Fp8-UI/s1600/firefoxmemorymanager2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="380" src="http://3.bp.blogspot.com/-XLEpjRNbWoQ/UCFpSq5dKDI/AAAAAAAAAC0/ZNy24Fp8-UI/s640/firefoxmemorymanager2.png" width="640" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
The left side contains the process name (firefox.exe), process ID, number of page faults (total), working set size in bytes, average page faults in 1 sec interval over the last 60 seconds, and number of page faults in the last 1 second.<br />
<br />
In the middle we see a log (1 line per second) of the working set size in bytes, the page faults for each second interval and the total process page faults.<br />
<br />
On the right we see one line each time a memory collection occurs, and what was the working set size the moment the collection was triggered.<br />
<br />
At the top right we can set the desired limit (in Mega Bytes), at the bottom left we can stop the process monitoring, and finally the Hide Window button will send the application to the tray. If you want to exit the application completely, you need to right click at the system tray icon and select "Exit".<br />
<br />
I hope this covers the basics....<br />
<br />
There is no license for the application, you can take it and use it for free in any way you like. If you create<br />
some improved version, I would appreciate a post here, so that people can then know where it came from and where to get the improved version.<br />
<br />
Here is the link to the application <a href="http://www.mediafire.com/download.php?6pafyd4d257pojy">http://www.mediafire.com/download.php?6pafyd4d257pojy</a><br />
<br />
and here is the link to the source code <a href="http://www.mediafire.com/download.php?akzcto8g3v5m5y6">http://www.mediafire.com/download.php?akzcto8g3v5m5y6</a><br />
<br />
Any comments are welcome, I hope this post helps someone in any way.csloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0tag:blogger.com,1999:blog-4460935810467623413.post-82054865158632923542011-10-21T21:22:00.001+01:002013-08-05T21:38:13.830+01:00How to import existing code to svn with visualsvn and tortoisesvnYou might have some code which is not under version control, and it is mixed with binaries or other files that you don't really want in the svn repository. If the code in question contains both files that should be and should not be versioned, the easiest way to do it is this:<br />
<br />
1. In visualsvn create a new repository, with the name of the project you want to version, let's say the new repository name is MyProject<br />
<br />
2. Rename the folder containing the source code you want to version, let's say is called MyProject, we rename it to MyProject-<br />
<br />
3. Create a new folder with the same name as the one you just renamed: MyProject<br />
<br />
4. Using tortoise svn do an svn checkout from repository MyProject into the new empty folder MyProject you have just created<br />
<br />
5. Move all the files from the renamed folder MyProject- into the new folder MyProject<br />
<br />
6. Using tortoise svn do an "add" operation on the new folder MyProject, and choose the files you want to include in svn (probably you will avoid the binaries, object files and other stuff that you don't want versioned)<br />
<br />
7. Using tortoise svn do a commit of the newly added files/folders into svn repository<br />
<br />
8. Delete the renamed folder MyProject- as it is not needed any morecsloggerhttp://www.blogger.com/profile/02035016342062185570noreply@blogger.com0