Make a Payment Calculator Using C#

If you are very careful about managing your finances, then you might need something to manage your finances. Oftentimes you might find yourself stuck calculating for payments of a  loan in a given term and interest rate. In this post by BlackBeltCoder.com, Jonathan Wood shows you how to build a payment calculator using C#.

This class can certainly be expanded to handle some variations whenever the interest has changed or add features like amortization. This tutorial will show you the basics and it can help it guide you throughout your future projects.

 

Read the rest of the post here: http://www.blackbeltcoder.com/Articles/algorithms/c-payment-calculator

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

Binding XAML Controls Directly to the ViewModel Methods

When developing client-side XAML, MVVM pattern is commonly used. It means that the ViewModel business methos are bound to XAML View not by the events directly, but to the Commands that should be published by ViewModel.

 

In order to invoke a ViewModel method, you need to publish a command that is bound to control on one hand, and to the ViewModel method on the other hand from the command. This makes sure the code are working correctly. However, this implementation is usually uncomfortable and often wordy.

 

This post will show you a different approach to remove redundant code and to simplify things. This also ensures that the controls are not bound to the commonds, but tot the methods directly.

Read the rest of the post here: http://www.codeproject.com/Articles/788742/Binding-XAML-controls-directly-to-the-ViewModel-me

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

SQL Server Data Compare Tool

Apex Data Diff is a SQL Server development tool that is used to compare and analyze data stored in tables, views, or between SQL databases and backups, and for simplifying data migrations between databases. This can present view of differences between objects  and encrypted objects nad also a row level difference for each object.

When SQL data comparison is complete, you can synchronize specified objects between databases or select a specific row for synchronization. You can also isolate the differences that are important with advanced filtering of object and rows.

Read the rest of the post here: http://blog.sqlauthority.com/2014/06/23/sql-server-sql-server-data-compare-tool/

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

SQL Server Tables: 11 Questions You Were Too Shy to Ask

There are some aspects in SQL Server that a lot of people get wrong mainly because they seem so obvious that no one dared to ask questions about it. Robert Sheldon said that there are no dumb questions about SQL Server and each deserves frank answers.

Here are some common questions you were to shy to ask:

  1. “I often come across T-SQL script in which the names of tables, columns and other objects are enclosed in brackets. Even data types are often treated this way. Do I have to enclose object names in brackets?”
  2. “I’m trying to create a table that contains a foreign key, but I keep getting an error message saying that there are no primary or candidate keys in the referenced table that match the referencing column list. What’s going on?”

Aren’t they too obvious? But there are explanations to that. Find out how  Sheldon answers these questions and what are the other questions we are too shy to ask here: https://www.simple-talk.com/sql/t-sql-programming/sql-server-tables—11-questions-you-were-too-shy-to-ask/

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

Functions in Swift

Functions are blocks of functionality that you can call, pass parameters to, and return parameters from. They are used to accept returnn Tuble which is a convenient way to return multiple values at once.

In Swift, we can write functions this way:

   1:  func GetADrink(drinkName:String) {
   2:      var test = drinkName
   3:  }
   4:  
   5:  GetADrink("Mango Juice")


One of the best things about Objective C is its self-documenting codes when it comes to functions. When reading a function call in Objective C, you can immediately tell what parameter is what. This is because parameter names are right there with invocation statement.

Here are some other uses of functions in swift: http://blah.winsmarts.com/2014-6-Functions_in_Swift.aspx

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

Using Migration Scripts in Database Deployments

A migration script changes all or part of a database from one version to another. It migrates it between version. This alteration can be done by simply adding or removing a column to a table, or a complex refactoring task like splitting tables or changing column properties.

For every migration path between database version, we need to store in version control the migration scripts that describe those steps required to transform, change, and move the data and moving it around and transforming it in the process.

Migration scripts can be forward, or up migration that go to a newer version of the database, or backwards or down to fall back to the previous version of a database.

Read the rest of the post here: https://www.simple-talk.com/sql/database-administration/using-migration-scripts-in-database-deployments/

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

How to Control Transfer Statements in SWIFT

There are four ways to control transfer statements in Swift, and these are:

continue

break

fallthrough

return

and of course, labelled statements

This tutorial will teach you how to do control transfer statements using swift, what these transfer statements are used for and what are its limitations.

A break, for example, breaks the loop and goes to the last.

Continue, restarts the loop, take this code for example:

   1:  var numbers = [1,2,3,4,5]
   2:  var oddNumbers = Int[]()
   3:  var evenNumbers = Int[]()
   4:  
   5:  for number in numbers {
   6:      if (number%2 == 1) {
   7:          oddNumbers.append(number)
   8:      } else {
   9:          continue
  10:          evenNumbers.append(number)
  11:      }
  12:  }
  13:  
  14:  oddNumbers
  15:  evenNumbers

This code simply finds all Odd numbers. All the even numbers array will be empty.

Read the rest of the tutorial here: http://blah.winsmarts.com/2014-6-Control_transfer_statements_in_SWIFT.aspx

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

Remove IIS Header Bloat in ASP.NET MVC

When you create a new ASP.NET MVC project, you are going to get a lot of bloat headers of any response from the page. This is done by default and it’s sometimes annoying  because none of it is either necessary or helpful. Worse, it can be harmful as potential hackers can easily identify the system, for example.

Here is the default ASP.NET project’s response ot a request for a page:

Cache-Control:private

Content-Encoding:gzip

Content-Length:2616

Content-Type:text/html; charset=utf-8

Date:Wed, 11 Jun 2014 16:07:59 GMT

Server:Microsoft-IIS/8.0

Vary:Accept-Encoding

X-AspNet-Version:4.0.30319

X-AspNetMvc-Version:4.0

X-Powered-By:ASP.NET

The first thing you need to do is remove X-AspNetMvc-Version header. To remove this, simply open your Global.asax.cs file to Application_Start, then add this code:
MvcHandler.DisableMvcResponseHeader = true;

Read the rest of the tutorial here: http://www.codeproject.com/Tips/785867/ASP-NET-MVC-Remove-IIS-Header-Bloat

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

SQL Server Service Pack 2 Released

Microsoft this week has released SQL Service Pack 2. The SP2 goes by the Release To Manufacturing nomenclature. This means that the software is ready for imaging on hardware by equipment providers.

The SQL Server 2012 SP2 can also be downloaded here, but it will arrive in Microsoft Update service by the end of July.

Microsoft is offering SP2 in both 32 and 64 bit version for SQL Server 2012. This also goes the same for Management Studio and Express versions.

SQL Server 2012 SP2 contains updates based on customer feedback since the last service pack and the release of Cumulative Update 9. Microsoft added that they have some support and functionality fixes to AlwaysOn, a highly valuable disaster recovery capability of SQL Server 2012.

Read the rest of the news here: http://mcpmag.com/articles/2014/06/11/sql-server-2012-sp2.aspx

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS