Top Blogs on Investment, Money, and Debt #Root #By Sayed Ahmed

http://www.modestmoney.com/top-canadian-finance-blogs-2013-final-round/

From: http://sitestree.com/?p=2276
Categories:Root, By Sayed Ahmed
Tags:
Post Data:2015-08-23 08:51:29

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Where to open RESP account? #Root #By Sayed Ahmed

Where to open RESP account?
http://www.esdc.gc.ca/en/student_loans/resp/promoters_list.page#A

You can also check if the institute offers CLB – Canada Learning Bond, ACESG -Additional Canada Education Savings Grant, Everybody has CESG

 

Questrade Offers all

RBC Direct Investing Offers all

CIBC some Schemes offer all

RBC Target Education plans offer all

 

if you are from Alberta or Saskatchewan, you might also check if the scheme allows the province specific grants as well.

 

You can check about the education grants for children at

http://www.canlearn.ca/eng/savings/cesg.shtml

 

Questions to ask when opening an RESP account

http://www.canlearn.ca/eng/savings/resp_provider.shtml

 

 

  From: http://sitestree.com/?p=2270
Categories:Root, By Sayed Ahmed
Tags:
Post Data:2015-08-22 19:15:46

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Razor syntax and MVC application demo #Root #By Sayed Ahmed

Razor syntax and MVC application demo
[youtube http://www.youtube.com/watch?v=Oi-isA8qdw0&w=560&h=315] From: http://sitestree.com/?p=2185
Categories:Root, By Sayed Ahmed
Tags:
Post Data:2015-08-10 22:09:37

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Introduction to WebAPI and a demo application on Web API #Root #By Sayed Ahmed

Introduction to WebAPI and a demo application on Web API
[youtube http://www.youtube.com/watch?v=6KPu7DjIEwc&w=640&h=390] From: http://sitestree.com/?p=2183
Categories:Root, By Sayed Ahmed
Tags:
Post Data:2015-08-10 20:32:10

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Comparisons among Dot Net Based CMS solutions #Root #By Sayed Ahmed

Comparisons among Dot Net Based CMS solutions

[youtube http://www.youtube.com/watch?v=T049FbIvZgU&w=854&h=510] From: http://sitestree.com/?p=2123
Categories:Root, By Sayed Ahmed
Tags:
Post Data:2015-07-26 22:50:59

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Visual Studio, C# : Why should or should not you use Code Contracts #Root #By Sayed Ahmed

http://programmers.stackexchange.com/questions/211337/why-would-i-use-code-contracts

Why Use?

To avoid null reference exceptions

To avoid critical and costly failure of code/software

However, code may look over crowded, and can be difficult to maintain and extend if you use Contracts.

 

If yours is not a critical application, and in general, failures can never be that costly for you: then you might not need to use it everywhere ().

 

However, be careful in writing your code, deal (address) with the cases where the objects might be null, additionally, properly initialize your variables.

 

Read the page as provided in the url above.

 

Related Tools: If you want to use Contracts, you need to install both of the tools below:

 

https://visualstudiogallery.msdn.microsoft.com/1ec7db13-3363-46c9-851f-1ce455f66970

https://visualstudiogallery.msdn.microsoft.com/02de7066-b6ca-42b3-8b3c-2562c7fa024f

 

That’s right I had to install to work with.

After you install, you will see a tab Code Contracts in the project properties.

 

The useful part:

Contracts vs. Null Object pattern

Now this is at least in the same ball park. Languages like Scala and Haskell has had great success with this approach to eliminating null references entirely from programs. (Even if Scala formally allows nulls the convention is to never use them)

If you already employ this pattern to eliminate NREs you’ve basically removed the largest source of runtime failures there is in basically the manner contracts allow you to do it.

The difference might be that contracts has an option to automatically require all your code to avoid null, and thus force you to use this pattern in more places to pass compilation.

On top of that contracts also give you the flexibility to target things beyond null. So if you no longer see any NRE in your bugs you might want to use contracts to strangle the next most common issue you might have. Off by one? Index out of range?

But…

All that being said. I do agree that the syntactic noise (and even structural noise) contracts add to the code is quite substantial and the impact the analysis has on your buildtime should not be underestimated. So if you decide to add contracts to your system it would probably be wise to do so very carefully with a narrow focus on which class of bugs one tries to address.

 

 

Read this as well:

http://research.microsoft.com/en-us/projects/contracts/faq.aspx

  From: http://sitestree.com/?p=2115
Categories:Root, By Sayed Ahmed
Tags:
Post Data:2015-07-25 08:51:38

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Restart Jupyter Notebook Kernel using Python Code

import IPython IPython.Application.instance().kernel.do_shutdown(True) 
#automatically restarts kernel
Worked for me
https://stackoverflow.com/questions/37751120/restart-ipython-kernel-with-a-command-from-a-cell




*** . *** *** . *** . *** . ***

Courses: http://Training.SitesTree.com (Big Data, Cloud, Security, Machine Learning)
Blog
: http://Bangla.SaLearningSchool.com, http://SitesTree.com

8112223 Canada Inc./JustEtc: http://JustEtc.net

Shop Online: https://www.ShopForSoul.com/
Linkedin: https://ca.linkedin.com/in/sayedjustetc

Medium: https://medium.com/@SayedAhmedCanada

C# Image Dimension . Keep the dimension as it is when Exporting to Excel #Root #By Sayed Ahmed

System.Drawing.Image img = System.Drawing.Image.FromFile(@"c:ggsggs Accessimagesmembers1.jpg");

int width = img.Width;
int height = img.Height;

---
Excel and Exporting

When you export to Excel using OpenXML standard
You usually mention where to start and where to end. I.e. cell to insert from and the width/height in number of cells.

Hence, you need to know how many pixels are in one cell for excel (if you want to keep the same height and width)

In general: 
64 pixels on the width
15 pixels on height
(may have an assumption here, Excel with Arial and 10 size font)
--

There are C# Classes and Methods to know/calculate how many pixels per cell.
It actually also depends on some configurations of the Excel file
---
When you use Calibri and 11 size font,
56 pixels on the width
and 17 pixels on height
may work

ideally, you should use code/C# classes to find out (pixels per cell) for the current document.

Still, if you want to use configurations and hard-coded numbers, you can provide the configurations in the web.config file under app.settings using key/value pair.
To retrieve:

WebConfigurationManager.AppSettings["WidthInPixelsForACell"];

--

From: http://sitestree.com/?p=2099
Categories:Root, By Sayed Ahmed
Tags:
Post Data:2015-07-18 22:49:17

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Using Kendo Chart; Kendo Chart Events #Root #By Sayed Ahmed

Using Kendo Chart; Kendo Chart Events

Sayed Ahmed

 

One example that helped in real projects

http://demos.telerik.com/kendo-ui/tabstrip/events

 

The example shows how you can execute functionality on different Kendo Chart events. You can see the methods and events mapping as below

$("#tabstrip").kendoTabStrip({
                    select: onSelect,
                    activate: onActivate,
                    show: onShow,
                    contentLoad: onContentLoad,
                    error: onError,
                    contentUrls: [ , "../content/web/tabstrip/ajax/ajaxContent1.html", "error.html" ]
                });

Problem to Solve:
In my case, under a Kendo Chart (actually in an embedded iframe), there were some buttons. The kendo chart had multiple tabs. The height of the tabs were not the same as the contents were different. Hence, because of the iframe height (as was set to the height of the most height tab content - before this solution was applied), the buttons were far off (down) sometimes (if a tab content was not much). I was required to bring the buttons just under the content.

Solution:
Used Kendochart events to resolve the issue, and depending on the tab content height, re-sized the iframe height.

if you use select event, you may see that the buttons are still far off esp. when you move from a more height tab to a less height tab for the first time.  

Activate event helped to resolve the issue.

Another Problem to Solve:
the iframe was showing remote content i.e. cross domain content where I had access to both domains. Used post message communications to send the page height information to the client/parent and from parent/client the iframe size was adjusted. 

Please also check if you need to configure the remote Webserver for allow-access-origin or similar. I did though there were multiple stuff to do on cross-domains; hence, if for this particular case, allow-access-origin is mandatory or not, I need to double check. However, apparently, you need it or you need something similar as even for post message communications, you need to work with both domains.

Anyway, the complete code from the URL is as below as I just mentioned (just in case, the page is not available in future.).

 $(document).ready(function() {
                function onSelect(e) {
                    kendoConsole.log("Selected: " + $(e.item).find("> .k-link").text());
                }

                function onShow(e) {
                    kendoConsole.log("Shown: " + $(e.item).find("> .k-link").text());
                }

                function onActivate(e) {
                    kendoConsole.log("Activated: " + $(e.item).find("> .k-link").text());
                }

                function onContentLoad(e) {
                    kendoConsole.log("Content loaded in <b>"+ $(e.item).find("> .k-link").text() + "</b> and starts with <b>" + $(e.contentElement).text().substr(0, 20) + "...</b>");
                }

                function onError(e) {
                    kendoConsole.error("Loading failed with " + e.xhr.statusText + " " + e.xhr.status);
                }

                $("#tabstrip").kendoTabStrip({
                    select: onSelect,
                    activate: onActivate,
                    show: onShow,
                    contentLoad: onContentLoad,
                    error: onError,
                    contentUrls: [ , "../content/web/tabstrip/ajax/ajaxContent1.html", "error.html" ]
                });
            });
        </script>

From: http://sitestree.com/?p=2091
Categories:Root, By Sayed Ahmed
Tags:
Post Data:2015-07-12 18:32:41

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Misc Dot Net Stuff #Root #By Sayed Ahmed

In real life projects in .Net platform, you might need to know and understand the following:

 

http://stackoverflow.com/questions/10498102/debugging-with-vs-other-than-localhost

http://stackoverflow.com/questions/4653236/unable-to-start-debugging-on-the-web-server-could-not-start-asp-net-debugging-v

http://stackoverflow.com/questions/16922742/what-is-the-entry-point-for-an-asp-net-mvc-4-application

https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh750287.aspx

https://msdn.microsoft.com/en-ca/library/dd577079.aspx

http://blogs.msdn.com/b/amb/archive/2012/07/31/easiest-way-to-generate-machinekey.aspx

http://stackoverflow.com/questions/8747912/how-to-install-dotnetnuke-so-i-can-migrate-existing-users

http://stackoverflow.com/questions/11930381/log4net-multiple-appenders-writing-to-event-viewer

https://portal.smartertools.com/kb/a2487/where-are-my-iis-log-files-stored.aspx

  From: http://sitestree.com/?p=2084
Categories:Root, By Sayed Ahmed
Tags:
Post Data:2015-08-07 18:01:36

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada