My First Post      My Facebook Profile      My MeOnShow Profile      W3LC Facebook Page      Learners Consortium Group      Job Portal      Shopping @Yeyhi.com









Thursday, June 17, 2010

On Someone's something, someone said something to someone, somewhere at some time. Why am I to be blamed?

Python string encryption and decryption is so easy.

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 came across Ideone. I stopeed there. And I used it. Now I give stars to the IDEone Teams accompalishments. IDEOne is an online IDE (Integrated Development Environment) and debugging tool which enables users to share and run code online. The website describes that It is like a pastebin designed specifically for programmers and developers. All the code snippets run on Ideone and can be accessed conveniently via hash links. The easy to use UI is so easy and you dont have to write extra configuration lines of codes. It is as simple as writing code in and IDE on your device itself. And most importantly, since this runs on server you can run codes even on mobile phones. This is just great.


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.blogspot.com)

in reference to: Google (view on Google Sidewiki)

Deleting Google Search Box History

I have one close friend Rehan who has worked in HDFC, Airtel, Aircel and Reliance. He is going to join Bank of America in a weeks time. It so happened that he needed to clear his Google Search history from his desktop machine. He cleared Internet History but surely Search box history would stay at some other location. So, for his rescue he turned to me today and asked for help. His introductory statement was -- O! Adobe Engineer, Software banane wale ie. Software Engineer he meant ;)., Help me out !!
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

Recently in Acrobat Team of Adobe Systems, I was amidst a situation in which I had to overload the “new” and “delete” operators. This came like a thunderstorm to me initially, but merely a second thought gave me some comfort. And hola!! Within two hours I was with complete implementation of the Idea. I have written this as my new story because , For most programming tasks, the default implementation of new and delete is sufficient. In fact, many C++ programmers get along without even knowing that they can override these 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. ;)