Learning with learners
W3LC brings you Discussions For IT People. Stuffed with personal touch & humor by Anwar Jamal Faiz.
A great place to read and participate in IT discussions. With over 1.5 million hits from bright technical minds across the globe, W3LC urges to read, enjoy, and comment. Learning, ofcourse, would just be a side-effect. Also visit MeOnShow. And, Technology Job Puzzles.
Thursday, June 17, 2010
On Someone's something, someone said something to someone, somewhere at some time. Why am I to be blamed?
Just try the following piece of code-->
__________________________________________________________________________________
import os
a='726f745f3133'
b="Ba Fbzrbar'f fbzrguvat, fbzrbar fnvq fbzrguvat gb fbzrbar, fbzrjurer ng fbzr gvzr. Jul nz V gb or oynzrq?"
print b.decode(a.decode('hex_codec'))
__________________________________________________________________________________
Can u guess the output??
;) Keep updated. Stay tuned @Discussioons for IT People
Tuesday, June 15, 2010
Ideone.com | Online IDE & Debugging Tool
I created this snippet to test a simple code on IDEOne in C++. And it worked properly!!
IDEOne gives you option to write you code online. It is really useful for beginners and evangelists. The best part is that you can write in 40+ languages. It provides you with details about code and its execution including the memory usage, execution time, compiler version, output generated by program and error messages. This service would be of great use when you have to quickly execute code and don’t have a desktop IDE installed.
You can check this out at Ideone Home page
You can optionally turn on syntax highlighting for your code. Much more to see itself than description. But would be a nice online landup where you can learn and test some rare languages too.
You can also check out the public code snippets executed by other users. Ideone is free to use, does not require installation of any extra software or plug-ins, and can be used as a replacement for your existing desktop IDE.
I even tried with simple Python Code:
I was inquisitive to know on what machine is the code and this IDE really executing. I found out that using above code. Result came out to be ‘posix’.
Wednesday, June 9, 2010
Salute to Google. A legendary WebPage.
Recently, I have come across an innovative idea of Google. Google Directory and SideWiki. I guess this can be a revolutionary step to involve masses in writing about internet. A great Indexing can happen then . I guess working on similar lines of google directory stuff.
You people seriously Rock. Salute to Larry and Sergy.
Thanks and regards on behalf of Universe,
Mohd Anwar Jamal Faiz
( www.new-it-discussions.
Deleting Google Search Box History
And again wat a coincidence. I have just now received same query from my colleague working in Adobe Flash Media Server Team. So a common answer to these people with only a common IT Knowledge.
It should be remembered that search history that displays in the search box on the Google homepage is stored by your browser, not by Google. You can clear the history or disable this feature entirely by following steps. No need to panic that Google will store these information:
a.Go to the “Tools” menu
b.Select “Internet Options”
c.Select the “Content” tab
d.Within the “Personal Information” area, select “AutoComplete”
To clear the current history, click on “Clear Forms”
To disable this feature entirely, uncheck the “Forms” box
But do remember that there are still many things that Google Bro stores. When you are signed in then your entire online search activity is stored and monitored. More on this some other time.. :)
Mohd Anwar Jamal Faiz
( Do visit http://www.meonshow.com )
Tuesday, June 1, 2010
Overriding New and Delete Operators
I have really come to conclusion that modifying these operators for a given class is essential in certain advanced programming tasks. One example might be when you need to ensure that all instances of a class are allocated from a custom memory pool instead of the free-store.
There are other useful applications of overriding new and delete: implementing a garbage collector, or ensuring that objects are allocated on a specific memory address.
My design is as follows:
class A
{
public:
A();
~A();
static void* operator new (size_t size);
{
void *p=allocate_from_pool(size);
return p;
}
static void operator delete (void *p);
{
release(p);
}
};
THe real use come when you write some additional tasks in these functions. The easiest and most commonly used tasks could be refCount or logging in some file, etc.
Remember that when you declare new and delete as class members, they are implicitly declared static. Still, it's advisable to add the keyword static to their declarations to document this property explicitly.
Again it is important to remember that C++ guarantees that an object's destructor is automatically called just before delete executes. Therefore, you shouldn't invoke A's destructor explicitly. In case you do so, it would cause undefined behavior as the destructor will actually run twice.
Now this implementation can actually be used in your personal or professional work. Just don’t stop thanking me for this. ;)