Tampilkan postingan dengan label Komputer. Tampilkan semua postingan
Tampilkan postingan dengan label Komputer. Tampilkan semua postingan

Sabtu, 04 Februari 2017

Resep Render Rumus Matematika

Saya menggunakan render engine LaTeX dari CodeCogs. Namun, pernah terjadi tidak munculnya lambang operasi matematika yang saya inginkan. Rupanya ketika itu, CodeCogs mengubah berkas kodenya sehingga harus dilakukan penyesuaian. Kini, saya mendapati lagi adanya sedikit perubahan pada petunjuk penggunaan produk CodeCogs. Lambang operasi yang saya inginkan masih tertampilkan, tapi jadi muncul dorongan untuk mendokumentasikan cara menggunakan render engine LaTeX CodeCogs.

Present Procedure

Masuklah ke pengaturan Tata Letak dan Tambahkan Gadget dari bagian manapun!

Gambar 1. Tampilan pengaturan Tata Letak. -- Klik pada gambar untuk memperbesar!

Pada jendela yang tampil, pilih jenis HTML/JavaScript!

Gambar 2. Pengaturan jenis Gadget yang akan ditambahkan.

Pada jendela yang tampil, masukkan kode seperti pada gambar dan simpan Gadget baru Anda!

Gambar 3. Kode isian untuk menggunakan render engine LaTeX CodeCogs.

Anda dapat menaruh kode ini di bagian manapun pada halaman blog. Petunjuk pemasangan ini merujuk pada petunjuk versi sebelumnya sehingga agak berbeda dengan petunjuk terbaru. Di antara perbedaannya yaitu saya masih menggunakan script JavaScript, sedangkan petunjuk terbaru menyarankan digunakannya script PHP. Namun sejauh ini, saya tidak menemui kendala dengan prosedur seperti yang saya paparkan.

Elaborate Exercise

Bagaimana cara menggunakan render engine LaTeX CodeCogs? Dua gambar berikut menunjukkan caranya.

Gambar 4. Tampilan sumber dengan mode HTML. -- Klik pada gambar untuk memperbesar!
Gambar 5. Tampilan jadi lambang matematika. -- Klik pada gambar untuk memperbesar!

Dari mana kita tahu kode LaTeX yang harus digunakan? Ada banyak sekali rujukan LaTeX, misalnya Wikibooks: LaTeX/Mathematics.

Jumat, 30 Januari 2015

SUDO Living with Ubuntu Family

Command line is indispensable for living with Linux. Not a distro adventurer myself, having tried only Ubuntu, Elementary OS, and stucked with Xubuntu, I found these commands worthy of keeping, courtesy of various communities and support forums. By the way, you will need to change the red colored values to desired ones!


Managing Local Repository

We might want to archive our DEB packages locally; we need to install dpkg-dev then. Package manager with GUI can be used, but this code is sufficient.
Use Synaptic Package Manager if you want some GUI!

sudo apt-get install dpkg-dev

We then put the DEB packages into a folder. Let us make, for example, a repository folder in our home directory. Fill the folder with the DEB packages and add the folder to software sources list with this command!
Use Software and Updates if you want some GUI! The sources list is in Other Software tab.

sudo apt-add-repository deb file:/home/your-account-name/repository/ ./

Navigate to our local repository folder, and execute this command!
Sorry, I could find no GUI method.

dpkg-scanpackages . /dev/null > Packages

Finish with hence command!
Use Synaptic Package Manager if you want some GUI!

sudo apt-get update

With the release of updates, we might end up having same packages with different versions. Deleting the old ones manually is feasible for small repository. For big one, however, use this script! We don't have to navigate to our local repository to execute the process.
Sorry, no GUI.

sudo dpkg-scanpackages /home/your-account-name/repository 2>&1 >/dev/null | grep -Po '((\/.*?deb)(?=.*?repeat;))|used that.*?\K(\/.*deb)' | xargs rm


Managing Video Files

We will need to install Mencoder and AVConv. Open terminal and roll this command!
As always, Synaptic for the GUI is.

sudo apt-get install mencoder libav-tools

Do you need to crop some videos? Here is the recipe.

avconv -i input-file.mp4 -vf crop=output-width:output-height:leftmost-crop-start:topmost-crop-start output-file.mp4

Merge the videos with this.

mencoder -ovc lavc -oac mp3lame video1.mp4 video2.mp4 -o completevideo.mp4

Video trimming is done with hence command.

avconv -i input-file.mp4 -ss start-hour:start-minute:start-second -t duration-hour:duration-minute:duration-second output-file.mp4

As for clockwise 90° video rotation, use the following command.

avconv -i input-file.mp4 -vcodec libx264 -preset medium -crf 24 -threads 0 -vf transpose=1 -acodec copy output-file.mp4

For the above-mentioned three actions on video files, we have to navigate to the videos' directory and, sorry, I have found no GUI method.


Managing ATI Graphics Driver

Choosing the proprietary driver is easy with the GUI, but the uninstallation is not. (My first uninstallation trial years ago left me broken system.) Hence my fellow ATI Graphics user, here is how to revert back to open-source driver, only to pick the proprietary ones after.

Given that the code is correctly entered, we can safely ignore any error messages that appear after the processes.

sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev*
sudo rm /etc/X11/xorg.conf

For 32-bit systems, follow-up with hence!

sudo apt-get install --reinstall xserver-xorg-core libgl1-mesa-glx libgl1-mesa-dri

Use this instead for 64-bit systems!

sudo apt-get install --reinstall libgl1-mesa-glx:i386 libgl1-mesa-glx:amd64 libgl1-mesa-dri:i386 libgl1-mesa-dri:amd64 xserver-xorg-core

Configure Xorg, we will need to, and reboot to finish the task.

sudo dpkg-reconfigure xserver-xorg
sudo reboot

If we use binary driver provided by ATI, uninstallation is quite straightforward. I cannot recall how, but we will need to run uninstallation script already provided. Read the documentation of binary to find the guides!