Template Class Vs Class TemplateTemplate class: A generic definition or a parameterized class not instantiated until the client provides the needed information; jargon for plain templatesClass template: A class template specifies how individual classes can be constructed much like the way a class specifies how individual objects can be constructed; jargon for plain classesDangling pointerA dangling pointer arises when you use the address of an object after its lifetime is over. This may occur in situations like returning addresses of the automatic...
Wednesday, 27 October 2004
Friday, 22 October 2004
Solaris: Resetting Forgotten Root Password
Posted on 01:38 by Unknown
Need physical or remote console access to the system to use these steps: Press Stop-A on the console or Ctrl-] and send brk from a remote console connection to access the Open Boot Prompt (OBP)Insert a bootable Solaris CD and boot into single-user mode with boot cdrom -sMake a mount point within the /tmp file system by typing mkdir /tmp/mntMount the root partition of the boot disk in /tmp/mnt.ex. mount /dev/dsk/c0t0d0s0 /tmp/mntEdit /etc/shadow with vi /tmp/mnt/etc/shadowRemove the encrypted part of the root password (the second field; fields...
Tuesday, 19 October 2004
C++: Virtual Function
Posted on 11:43 by Unknown
A virtual function allows derived classes to replace the implementation provided by the base class. The compiler makes sure the replacement is always called whenever the object in question is actually of the derived class, even if the object is accessed by a base pointer rather than a derived pointer. This allows algorithms in the base class to be replaced in the derived class, even if users don't know about the derived class. The derived class can either fully replace (override) the base class member function, or the derived class can partially...
Monday, 18 October 2004
UNIX/Linux: File Permissions (chmod)
Posted on 01:49 by Unknown
A file's permissions are also known as its 'mode'; so to change them we need to use the 'chmod' command (change mode). There are two ways of specifying the new permissions using chmod: symbolic and absolute.Absolute ModeAbsolute mode is the one with the numbers. You can use simple arithmetic to arrive at the permission you are looking for. Consider:---------------------------------------------------------------------------| owner | group | everyone |---------------------------------------------------------------------------|...
Saturday, 16 October 2004
Achievement Award
Posted on 13:09 by Unknown
Got an Achievement Award/Certificate from Sun Microsystems, in recognition for my effort with Siebel Benchmark!! =:)Related post: http://technopark02.blogspot.com/2004/10/sun-achieves-winning-siebel-benchmark.h...
Friday, 15 October 2004
Solaris/C/C++: Benefit(s) of Linker (symbol) Scoping
Posted on 14:09 by Unknown
IntroductionBy default, the static linker (ld) makes all ELF symbols global in scope. This means it puts the symbols into the dynamic symbol table of the resulting binary such that other binary modules can access those symbols. The dynamic relocations that the dynamic linker performs during run-time are only necessary for the global (also known as external or exported) symbols. The static linker resolves references to local symbols (for example, names of static functions) statically when it links the binary.Application performs better if the run-time...
Wednesday, 13 October 2004
Sun C/C++: #pragma pack
Posted on 18:34 by Unknown
Let's have a look at the following program and the outputbpte4500s001:/sunbuild1/giri/testcases/%cat aligndata.c#include <stdio.h> typedef struct user { char name[10]; int age; float salary;} usr; int main(){ printf("\n ** sizeof(char) = %d, sizeof(int) = %d, sizeof(float) = %d\n ** sizeof(struct user) = %d\n", sizeof(char), sizeof(int), sizeof(float), sizeof(struct user)); return (0);}bpte4500s001:/sunbuild1/giri/testcases/%./a.out ** sizeof(char) = 1, sizeof(int) = 4, sizeof(float) = 4 ** sizeof(struct user) = 20 sizeof(struct...
Monday, 11 October 2004
C/C++: Structure Vs Union
Posted on 17:17 by Unknown
A structure is a collection of items of different types; and each data item will have its own memory location. Where as only one item within the union can be used at any time, because the memory allocated for each item inside the union is in a shared memory location i.e., only one memory location will be shared by the data items of union.Size of union will be the size of the biggest variable.Why do we need Union in the first place?Sometimes we may not need the data of all the (related) data items of a complex data structure and be storing/accessing...
C/C++/Java: ++ unary operator
Posted on 15:52 by Unknown
#include <stdio.h>int main(){ int i = 5, j = 5; int total = 0; total = ++i + j++; printf("\ntotal of i & j = %d\n", total); return(0);}What will be the total after the execution of total = ++i + j++ statement? 12?Let's check the output of this program:total of i & j = 11Explanation:The ++ (increment) operator adds 1 to the value of a scalar operand. ++ can either be placed before or after the operand. If it appears before the operand, the operand is incremented, and then the incremented value is used...
Thursday, 7 October 2004
Sun achieves winning Siebel benchmark
Posted on 13:13 by Unknown

I'm very glad to be one of the major contributors of this benchmarking effort. As Sun hasn't published any competitive benchmarking numbers running Siebel on Sun platform for long, we started off with a single goal "must win" and put Sun on the top of UNIX vendors list with very well balanced price/performance ratio. P/P is what really the customer cares about i.e., customer needs superior performance with low cost.We spent nearly two and half months...
Wednesday, 6 October 2004
Database: Oracle Server Architecture (overview)
Posted on 18:02 by Unknown
Oracle server consists of the following core components: 1) database(s) & 2) instance(s)1) database consists of: 1) datafiles (.dbf files) <- information (data) will be stored in flat files on the disk 2) redo logs (.rdo & .arc files) Redo Logs hold recordings of every change made to datafiles; useful for fine-grained recovery of specific changes. Oracle uses several of these files so that when it gets done writing to the last file in the series, it begins overwriting to the first online...
Tuesday, 5 October 2004
Linux: Frozen Xwindows
Posted on 11:57 by Unknown
If Xwindows seem frozen, the following simple key strokes may bring back the Xserver without the need for a reboot Two ways to kill the Xwindows session (Xserver) (1) press "ctrl + alt + backspace" If xdm been running, a new X server will be spawned immediately and prompts with the login screen (2) press "ctrl + alt + F2" It brings up a a virtual console; login and run: # ps -ax | grep startx It will give you the PID of the Xserver. Just kill it with: # kill -9 <PID>...
Subscribe to:
Posts (Atom)