A readable example of how code become unreadable
Consider the following problem: You need to calculate how many dots are there in a square triangle for a specific width, for example . .. … Has an area of 6 . .. … …. Has an area of 10…
Consider the following problem: You need to calculate how many dots are there in a square triangle for a specific width, for example . .. … Has an area of 6 . .. … …. Has an area of 10…
Yet another Sudoku program Down to the basics, here’s what I did: Generate the whole board with backtracking, randomizing the number I chose at each step and remember the choice, this assures that the board is random, while still keep…
class Shape { // This method will be overridden by its children, even if it’s not abstract // and its children have not specified @Override void draw() { System.out.println(“Shape drawn”); }; @Override protected Object clone() { return null; } }…
It’s the era of Unicode, and you though the problem of encoding is a story of the past. Well, not if you’ve got to view old code. This is what you may get: Eclipse allows you to set the encoding…
Usually when working on windows form, I use this to do the work DropDownList1.DataSource = new ApplicationTableAdapter().GetDataBySystemID(1); DropDownList1.DataTextField = “Name”; DropDownList1.DataValueField = “ID”; But surprisingly, when switched to ASP.NET, the above code no longer works, at first I thought it…
Recently I noticed a friend keeps on updating his status which appears to be coming from the most trendy mobile devices on the market right now. He could have borrowed his friend’s devices though, but since he is watching the…
“Which programming language is the best?” It’s the kind of question that you will keep getting from aspiring programmers (maybe with some minor variations but it’s essentially the same problem). It’s a difficult question to answer. Although as old as…
I seem to have a special bond with ancient stuff. I were doing Pascal when C++ and WinForm was at their prime. Now I’m toying with a discontinued Microsoft Office feature. I just can’t help it, I have to work…
I once posted about how to make a splash screen with C#; yet it’s still a rectangle. While it’s true that you can replace my picture with something that have curvy edges, you’ll have aliased edges i.e. crooked and crude…
The reason [Source] It has been a bit hard to reach facebook lately. For some ISP like Viettel and FPT, a DNS change is all it takes to resolve facebook’s IP and restore access to the site. For some other,…