- Methodical
- Organized
- Systematic
- Tactful/Diplomatic but firm
- Evidence oriented
- Understanding
- Detail oriented
- Clear and concise communicator
- Forward thinking (Need to anticipate risks)
- Curious to experiment and see outcomes
Sunday, December 28, 2014
Qualities of a good tester
Saturday, December 20, 2014
QR Generation ASp.net MVC
http://zxingnet.codeplex.com
After obtaining the dynamically linked libraries (dlls), It is time to create the Asp.net Web project. The figure below shows that the example was made using .Net Framework 4.5.1 while the language is C# using the ASP.net MVC Web project template.
Upon creating the project, Go to a the Home View files and open the index.cshtml
Feel free to change the text provided by the template before an initial test of the page. You can test by
pressing the button beside the browser.
The Page should appear with the expected content
Reference the Zxing Dlls
Browse to wherever the dlls are located. Then check if the zxing dlls were successfully referenced.
Add a class for the QR code generator. Name the class
The class was named QRCodeGenerator
Below is the code for that class
-----
----
Next step is to add a controller method that will call the QRCodeGenerator class's method returning the rendered image. The code of the method is seen below. In this example the Home Controller was given the method that returns the html code with the QR image of a given text
---
---
Enter the code for the cshtml. In this example the index under the Home contained the code for the Qr
Generation.
---
In my example the following code were modified after Visual Studio generated the Asp.net MVC C#
project
Look at the results. The solution should be ready to be built and published
After the publishing the page should appear on a browser. Feel free to enter a url on the textbox and
press the Get QR button
Sunday, November 23, 2014
Showing Date Difference with javascript html.
Here is the code
Saturday, November 1, 2014
Install Mysql server on Ubuntu 14.04
Summary of steps
- open terminal
- type sudo apt-get install mysql-server
- Confirm installation by pressing Y
- Wait for installation to complete
- Enter root proposed password when promted
- Confirm root password
- Enter command for running mysql server mysql –u root –p
- Type the root password confirmed earlier
- Done, feel free to use the Mysql database commands
. Go to the terminal and type sudo apt-get install mysql-server to start the installation. Eventually, a prompt will ask to continue or not. Enter Y to proceed to the installation.
You will be then asked for a password for the root account. Type it and reenter it.
After that more files are loaded until the installation is completed. Once the installation is completed, enter mysql –u root –p on the terminal. Afterwards,type in the root password entered earlier. You should then see the Mysql server communicating on the terminal.
Friday, October 31, 2014
Date Picker with Jquery
Jquery made it easy for making a date picker. Here is a sample code used in http://formatdelimeters.azurewebsites.net/Home/About.
<h3>Pick a date</h3> <script> |
Sunday, October 19, 2014
SQL Joining Illustrations
SQL Joining is used to combine rows of two or more tables. There are 4 general types of SQL joining which are inner, left, right and full outer.
Let’s start with inner Join. The image below shows that the returned rows with at least one match on both tables
Inner Join | Sample Inner Join Code |
SELECT <select_list> FROM TABLE A A INNER JOIN TABLE B B ON A.key=B.Key; |
The next is left Join where the rows from the left table as well as the rows matched rows on the right table are returned.
Left Join | Sample Left Join Code |
SELECT <select_list> FROM TABLE A A LEFT JOIN TABLE B B ON A.key=B.Key; |
Conversely, right Join has rows from the right table as well as those that matched on the left table returned.
Right Join | Sample Right Join Code |
SELECT <select_list> FROM TABLE A A RIGHT JOIN TABLE B B ON A.key=B.Key |
Full Join returns rows that have at least a match in one of the tables.
Full Outer Join | Sample Full Outer Join Code |
SELECT <select_list> FROM TABLE A A FULL OUTER JOIN TABLE B B ON A.key=B.Key |
Sunday, September 28, 2014
Generate table out of CSV text
Javascript
|
function WriteCsvToTable(csvText,
TablePane) {
/*Variable Declaration*/
var
Rows = csvText.split("\n"), Html = [];
/*Loop that makes the rows
Each row is split with the mark of the
comma.
Then Joined to make the row
*/
for (var
ctr = 0; ctr < Rows.length; ctr++)
Html.push("<tr><td>" +
Rows[ctr].split(",").join("</td><td>") +
"</td></tr>");
Html = "<table>" +
Html.join("") + "</table>";
$(TablePane).html(Html);
}
/*Source http://jsfiddle.net/frvQ2/*/
|
"
_tags and ends with "
HTML
|
<div class="row">
<h1>Enter
Your CSV Here:</h1>
<textarea id="csv" class="text">
Id,Product Name,Price
1,Sailor Hat,$5
2,Old Rod,$50
3,Waffle Maker,$120</textarea>
</div>
<div class="row">
<a href="#TablePane" onclick="WriteCsvToTable($('#csv').val(),
'#TablePane')" class="btn
btn-primary">Generate Table</a>
</div>
<div class="row" id="TablePane">
</div>
|
CSS
|
#TablePane tr:nth-child(odd) td{
background:#beeab4;
}
#TablePane td {
border : thin black solid;
width:1%;
}
|
Sunday, September 21, 2014
Comma Separated Values (CSV)
CSV example
|
Id,Product Name,Price
1,Sailor Hat,$5
2,Old Rod,$50
3,Waffle Maker,$120
|
Csv and Json can represent tabular data so they are interchangeable in some cases |
Saturday, August 23, 2014
Unit Testing C#
Mathematical function caller
|
public class MathOperator
{
public int Fibonacci(int number)
{
if (number <= 1)
return number;
return Fibonacci(number - 1) + Fibonacci(number - 2);
}
public int Summation(int maxNumber)
{
if (maxNumber <= 1)
return maxNumber;
return maxNumber + Summation(maxNumber - 1);
}
}
|
Test class
|
[TestClass]
public class MathFuncTest
{
[TestMethod]
public void TestFibonacci()
{
MathOperator toBeTested = new MathOperator();
Assert.AreEqual(toBeTested.Fibonacci(2), 1);
}
[TestMethod]
public void TestFibonacci_F3()
{
MathOperator toBeTested = new MathOperator();
Assert.AreEqual(toBeTested.Fibonacci(3), 2);
}
[TestMethod]
public void TestFibonacci_F8()
{
MathOperator toBeTested = new MathOperator();
Assert.AreEqual(toBeTested.Fibonacci(8), 21);
}
[TestMethod]
public void TestSummation_n100()
{
MathOperator toBeTested = new MathOperator();
Assert.AreEqual(toBeTested.Summation(100), 5050);
}
}
|
Sunday, July 6, 2014
Crashing Report: Visual Studio. Mysql Export
The error occurred after I selected a database(censored database name on the combobox). At first, the combobox was empty. I selected A database then Visual Studio Crashed. I repeated the procedure and it all results into Visual Studio 2013 crashing.
The error appears after clicking the item highlighted above. Interacting with the prompt is harmless.
The prompt indicated that there is a problem in getting the information regarding the database. The Access issue might have also occurred in the fatal error. Nevertheless, Visual Studio should have not crashed due to a disconnection. There should have been a fail safe or an error handler for this kind of situations. An error prompt like the one that appeared on the non fatal issue would have been nice instead of crashing Visual Studio.
The experience highlights that connecting on an external Mysql database from an Azure VM can be troubling. I also experienced server disconnection as seen in server explorer. Question is how to make databases connections to Azure VMs be reliable