What is the Difference between a Hash and MAC (Message Authentication code)?

The main difference is conceptual: while hashes are used to guarantee the integrity of data, a MAC guarantees integrity AND authentication. This means that a hashcode is blindly generated from the message without any kind of external input: what you obtain is something that can be used to check if the message got any alteration … Read more

Are semantics and syntax the same?

Syntax is the grammar. It describes the way to construct a correct sentence. For example, this water is triangular is syntactically correct. Semantics relates to the meaning. this water is triangular does not mean anything, though the grammar is ok. Talking about the semantic web has become trendy recently. The idea is to enhance the … Read more

What’s the differences between stored procedures, functions and routines?

Google is your friend. The first match for “mysql routine function procedure” is this: http://dev.mysql.com/doc/refman/5.0/en/stored-routines-syntax.html A quick summary: A stored routine is either a procedure or a function. A procedure is invoked using a CALL statement and can only pass back values using output variables. A function can be called from inside a statement just … Read more

What does “ad hoc” mean in programming?

“Ad hoc” is a Latin phrase that can apply to anything, not just programming specifically. It means something that was made up on the fly just to deal with a particular situation, as opposed to some systematic approach to solving problems. Regarding programming specifically, it’s probably similar to what Joel Spolsky recently called duct tape … Read more

What is the difference between Bitmap and Drawable in Android?

A Bitmap is a representation of a bitmap image (something like java.awt.Image). A Drawable is an abstraction of “something that can be drawn”. It could be a Bitmap (wrapped up as a BitmapDrawable), but it could also be a solid color, a collection of other Drawable objects, or any number of other structures. Most of … Read more

Is it “iterate through” or “iterate over” something? [closed]

“through” and “over” are useless adverbs. Examples: While iterating this collection, my code throws an error. This code iterates the collection. Your assignment is to write code that iterates the collection. It’s like saying “up north” or “down south”. “up” and “down” are useless. Instead you should say, “I am going north for the summer.” … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)