Suppose you have the following objects retrieved from a database, in an array. How would you generate a tree in HTML?
Labels
algorithm
allegro
anime
api
arcade
asdf
blender
books
boost
bootstrap
c
c++
CLR
cmake
cmd
common lisp
concepts
css
detective
emacs
free
games
graphical programming
graphics
gui
haskell
html
hyper-v
interpersonal skills
jade
jam
java
javascript
jni
jpostal
leadership
libpostal
library
linux
lsp
lsp-mode
management
maths
mingw
msvc
msys2
music
network
oop
open source
party games
phaser
postgresql
programming
promote
puzzle
quickfix
recommended
recorder
reference
review
sdl2
self-help
setup
sheet music
slime
team building
tidbits
tools
travel
tutorial
typescript
unity
vb
vm
web pages
winapi
windows
windows 7
windows 8.1
Showing posts with label algorithm. Show all posts
Showing posts with label algorithm. Show all posts
Sunday, 28 December 2014
Sunday, 2 February 2014
Tutorial: Constructing Pascal's triangle
Pascal's triangle is made up of several rows of numbers, with each successive row having one more number than the previous row. When the rows are stacked, a triangle-like pattern is formed, hence its name. Each element is the sum of the two elements on top of it. The first element (at the tip) is 1. At the sides, where there is only one element, it will be the equal to the sum of the element above it and zero -- 1.
Sunday, 1 December 2013
The careless mistakes that programmers make
This week has been a busy one, and I do wonder if my sexier-than-ever voice now is a sign that I should take a break. In any case, today I would like to share an "algorithm" I saw at the workplace. It is gentle reminder to always test your code...
Sunday, 27 October 2013
Three Way Handshake
The three way handshake is a simple way to establish communication. It is also useful in daily life, e.g. everyday conversations.
1) The client sends a request to the server. ("Hello, Boss.")
2) The server receives the request and returns an acknowledgement message. (Boss heard the call. He replies, "Yes, Grunt. You were looking for me?")
3) The client receives the acknowledgement message and returns one more acknowledgement message. (Grunt heard the request for confirmation. Grunt replies, "Yes, I have something to tell you." After which he begins to talk about his pay raise.)
Now both sides begin communication. At any time during the handshake, if a reply is expected but none is received after a timeout, the handshake "fails" and the client must initiate it again.
1) The client sends a request to the server. ("Hello, Boss.")
2) The server receives the request and returns an acknowledgement message. (Boss heard the call. He replies, "Yes, Grunt. You were looking for me?")
3) The client receives the acknowledgement message and returns one more acknowledgement message. (Grunt heard the request for confirmation. Grunt replies, "Yes, I have something to tell you." After which he begins to talk about his pay raise.)
Now both sides begin communication. At any time during the handshake, if a reply is expected but none is received after a timeout, the handshake "fails" and the client must initiate it again.
Sunday, 22 September 2013
Tutorial: Finding the greatest common divisor
One of the problems of the Malaysian education system (at least, implementation-wise) is teaching students to use algorithms without properly exploring the principle behind it, or how it "actually" works. I recall like yesterday how classmates in my pre-u classes complain about calculus being "magical". The general teaching pattern is "Just apply this series of steps mechanically, and the correct answer appears" - not a good way to foster independent thinking.
In this article we explore how to find the greatest common divisor, something that is taught in the Form One curriculum.
In this article we explore how to find the greatest common divisor, something that is taught in the Form One curriculum.
Subscribe to:
Posts (Atom)