Posts

rsh2/rsh Permission Denied

Even when everything is set right there could be "Permission Denied" error. .rhosts has all the entries etc. Then check the permission on .rhosts file: chmod 644 on users .rhosts file

Search and replace by parsing nested clause across multilines using recursive regex

 Let me start with the answer. The answer is: perl -p -i -e 'undef $/;$re = qr/\((?:[^()]*|(??{$re}))*\)/;s/(create\s+table \s+.[a-z,A-Z,0-9,.]*\s*$re)\s*(?!SPARSIFY)/$1 SPARSIFY /gis' test/* Now the question and story behind it:  Transforming existing code can be bit tricky and less useful sometimes. But at other times it can literally save our jobs! Here is a typical scenario: FuncName ("Hell brakes $heck if(blah (blah(blah(". "blah(blah))blah)))", Heaven); If the above function is called million times at different places and you want to change that crazy looking nested structure inside a function argument what will you do ? Ok, you can slurp the file to a scalar as in here: http://www.modernperlbooks.com/mt/2009/08/a-one-line-slurp-in-perl-5.html. Then use the recursive regexp idiom: $re = qr/\((?:[^()]*|(??{$re}))*\)/;      $input_scalar =~ s/(Hell\s+brakes\s+.[a-z,A-Z,0-9|.]*\s+if\s*$re)\s*(?!HELLIFY)/$1 HELLIFY /gis; The $re grabs every...

Relational XML

Why use hierarchical data model with relational databases? That is the story of XML in relational databases. Why can't XML be used to define data relations? So I looked around if it existed. This dude has an idea . Then came the boss with lotsa more ideii ! Right on!

C# .NET Application deployment

I am not overly familiar with this stuff. As I try to figure out. Images added to resources should be specified using relative path. If you try Visual Studio is smart enough to suggest. So the Source filed in the Property tab should like /YakshaTala;component/Resources/kanlogo.png YakshaTala is the root folder  Resources is the sub folder The rest about deployment soon... It appears this is a common problem. The solution is here http://geekrick.blogspot.com/2008/08/frustrating-net-framework-sp1-issue.html and in many other places .Best way is to google the error message deleting application specific part in the error message. I am able to install my app.

What ailes file systems

File systems have a single region of failure: the table. Corruption of allocation table renders all data waste. Such corruption reduces the problem of finding files in to the known problem of non trivial 'string comparison/search'. Go write a software to find the file headers in a DVD. We can write one but only if someone can lend a computer that can compute it before I am dead! So we need an idea that does away single region of failure.

Elements of Abstractions - Computation as simulation of models

Let us define 'abstraction' as 'hiding' for the purpose of this post. A 'level of abstraction' therefore is amount of hiding details of a particular kind. Elements are in a sense different 'kinds' of 'bricks' that build a level of abstraction. ...more

Questions?

Questions can be crazy! Look at interviewers on TV. They create so much trouble with simple questions and put good guys in trouble even if everything they said and did was right! Why and how? The trick is in questions they ask. Questions can be incorrect. What question implies could be out right wrong. More cunning is the warrant of what is implied in a question being wrong. It is hidden so deep that question looks all right. Yet something is odd about it! It occurred to me that we should study what can be called Interrogative Calculus? Propositional and other calculi do not cover logic of questions because questions are not propositions. However, questions are part of everyday logic and propositional calculus can not represent  . We therefore need a formal system that can account for questions. I dug to see if there was some research on this topic. Sure, there is. It appears that there is a proposal here.: : in 2001 . I am only 9 years behind! A lot of improvement ; It used t...