Posts

tar Tape Archive

Tar used to create archive files in Unix/Unix like systems to make tape backups. Create tar archive tar -cvf my_archive.tar myDirectory c = Create v = Verbose f = File List files in an archive tar -tvf my_archive.tar t = list v = verbose f = file Create tar archive with gzip compression tar -cvzf my_archive.tar.gz myDirectory c = Create v = Verbose z = Gzip Compression f = File Un tar / unzip tar -xvf  my_archive.tar

Compiler, Obect Code / Relocatable Code, Linker

Image
When we compile a C source file using the GNU C compiler (GCC), the compiler first translates the code into an assembly source file. This assembly source is then processed by the assembler, which is included with GCC. The assembler generates object code, which is in a relocatable machine code format and is usually not directly executable. Next, the linker steps in to link the necessary libraries. Libraries are also in a relocatable format, which is why we compile them with the -shared, -fpic, or -fPIC flags. During the linking process, the linker checks the library names included in the source file and verifies whether these libraries are available in the system’s default library path, typically /usr/lib on GNU/Linux systems. If the required libraries are not in the default path, you can specify their location by passing them as an argument to GCC using the -I flag, like so: gcc -I/home/shuja/Documents/libmy.so C Source File  Assembly Source (generated  by GNU C compiler...

Java Byte Code, Interpreter and JIT

Image
Generally, when a program is compiled to an intermediate level and then interpreted  by a virtual machine, it runs slower than it would run if compiled to machine code. However, with Java, the differential between the two is not important for general purpose. Because byte-codes are highly  optimized, the use of byte-code enables the Java Virtual Machine to execute programs much  faster than you might expect. Java is also designed as an interpreted language, so java does not have anything to stop  (on the fly) compilation of byte-code into machine code, to improve  performance. For this reason, the HotSpot technology was introduced after Java’s initial release. HotSpot provides a Just In Time (JIT) compiler for bytecode. When a JIT compiler is part  of the JVM, selected set of bytecode are compiled into executable code in real time,  on a piece, by, piece, demand basis.  It is important to understand that it is not practical to  compile ...

No one loved Kingswood more devotedly than he

Image
During World War I, Kingswood enlisted a group of present boys as cadet officers to fight on behalf of the Crown, the son of a family that was close to Kingswood — Brian Leslie De Vos  — Kingswood For Ever The Story of Kingswood Kandy - Chapter Kingswood and The World War - Page 98  "The thirteenth and last for mention is Brian Leslie de Vos who was wounded in action on the 28th March 1918 and died on the following day of his wounds. No one loved Kingswood more devotedly than he. He was entirely our own; he exulted in being ours and entirely ours. Every letter of his from the Front, to whomever written, had some endearing reference to the school. He was wounded once in France, and wrote afterwards : "I now have in my possession a copy of the Kingswood Song, stained with blood. It was on my person when I was wounded. It is the souvenir I value most. Can you get me the music of the Kingswood Song? Oh! for a Kingswood day again!" He left Kandy on the 18th October 1915....

Department for Persons Registration of Sri Lanka

Image
Yesterday, I went to the Department for Persons Registration to get a new NIC after losing my old one. I arrived at 9:00 AM and had to stand in a long queue for about 30 minutes. They then gave me a number card and told me they would call me to the counter according to that number. They finally called me at 11:30 AM, and I paid the fee. When I handed over my file, I mentioned that there was a correction needed in my name. They assured me that it wouldn't be a problem and that they would enter my name as it appears on my birth certificate. After standing around for a long time, they finally announced my name at 3:30 PM. However, when I received my NIC, I noticed that my name had not been corrected. What they did was simply copy the details from my old NIC and paste them into the new card (CTRL+C, CTRL+V). Usually, if there is an error, it should be corrected through the Deputy Commissioner of the One Day Service. I was very exhausted, so I didn’t bother correcting it and quickly lef...

Connect Huawei Modem Linux - USB Modeswitch

Image
When you connect a USB modem to a Linux system, it often identifies the modem as a USB storage device. As a result, you may not be able to access the internet through the modem. To resolve this issue, you need to change the device's identification mode using the usb-modeswitch package. If your system already has internet access, you can easily install this package. First, you should check whether usb-modeswitch is already installed on your system. To do this, open the Terminal and type the following command: sudo usb_modeswitch If the package is installed, you will see output confirming its presence on your system.

Install Gammu In Windows

Image
This tutorial's video is at the bottom of this post. First, download Gammu for Windows. http://wammu.eu/download/gammu/win32/ Then, extract the Files to a Folder. Next, in the Folder, Go to  Gammu-1.30.0-Windows\share\doc\gammu\examples\config Open the "gammuurc" file from Word Pad.  Then you will see as below screen shot.