I promised (myself and you all) to post atleast 2 posts per month this year. Which clearly did not work at all. This is because this post is the second post after the “promise post”. What is going on then. The fact is I am not that much busy that I cannot put up a new post on the blog. The fact is that right now there are at least three different things I need to handle and this context switch every day or multiple times a week does not let me actually click the publish button (you all know how hard it is to click that button).
Recently (more than a year now) I was working on a cluster analysis algorithm and previously I was learning while working with some basic feed forward neural networks. Along with this I also keep in touch with *nix system programming and Linux OS kernel architecture (and a bit of Solaris recently). Therefore things are diverse. The job I do in the daytime (for which I get paid) is another domain (though similar to the system programming thing, but not exactly). Therefore the contexts are pretty diverse for me therefore the focus keeps shifting.
There are quite a few good ideas, for which there are drafts written, but as usual, it stays at on the disk. Why I am posting this? I am posting this because I need to press the “Publish” button and try again start the posting.
Therefore let’s see.
It has been a long time since a post in this blog. I thought to break this silence with a short post.
Several text editors in Linux environment like KWrite and GEdit that will store automatic temporary files ending with a ~ (tilde) character. Generally it is a default setting in most of the major distributions. Initially this feature annoyed me, as now you have twice the number of files in your directory, and often used rm *~ to clear out the files. Although it was annoying at the beginning, there are several cases it saved me. Continue reading
Like last year here are some stats of this blog for this year from wordpress.com. Worse this year, especially post count is 16, not enough compared to last year post count 24. Lesser visits this year, but some new relatively new posts have caught attention. Hoping to keep the post count at least 2 posts per month on an average on 2014.
The WordPress.com stats helper monkeys prepared a 2013 annual report for this blog.
Here’s an excerpt:
The Louvre Museum has 8.5 million visitors per year. This blog was viewed about 75,000 times in 2013. If it were an exhibit at the Louvre Museum, it would take about 3 days for that many people to see it.
Click here to see the complete report.
Posted in Writings
int main (void)
int a = 5, b = 10, c;
c = a > 3 ? b = 5 : a = 3;
printf ("%d %d %d\n", a, b, c);
//cout << a << " " << b << " " << c << endl;
Have a look at the above code, what will be the outcome if the code was in C language and if in C++ Language (replace with printf with cout)?
Directly going to the solution. Compilation error for C, and works perfect (no warnings) with C++. I saw this problem is a C question and answer book which didn’t bother to explain, so here is the explanation. Continue reading
The problem statement is, an long array is given with n elements, we need to find all the pairs of numbers in this long array which have a constant difference k. I will post three methods. The first method is the brute force method and has a runtime complexity O (n2), the next method has runtime complexity O (n*log (n)), and the last one will have the runtime complexity O (n).
I have already posted a jumbled word solver written in C language, although what I posted is actually become old, as I have changed some of the things in the code. I will update the post with this (hope to update!) with the new changes, but before it I would like to post the the same stuff in other languages and with different datastructure. Recently I am learning Perl and brushing up C++, therefore I will post jumble word solver written in C++ and Perl in this post.
I couldn’t stop myself from posting this from xkcd, this one is extreme :D
Posted in Humor