Remove HTML Tags from a text String using JSoup HTML Library

JSoup is a very swift , lightweight library, which can be used to remove HTML Tags from a string containing HTML Tag Data to get only the text.

Sample program and screenshot below illustrate its use.

JSoup HTML Library

JSoup HTML Library

Java | Useful options for Debugger

java -agentlib:jdwp=help
Java Debugger JDWP Agent Library
——————————–
(see http://java.sun.com/products/jpda for more information)
jdwp usage: java -agentlib:jdwp=[help]|[<option>=<value>, …]
Option Name and Value            Description                       Default
———————                            ———–                       ——-
suspend=y|n                      wait on startup?                  y
transport=<name>                 transport spec                    none
address=<listen/attach address>  transport spec                    “”
server=y|n                       listen for debugger?              n
launch=<command line>            run debugger on event             none
onthrow=<exception name>         debug on throw                    none
onuncaught=y|n                   debug on any uncaught?            n
timeout=<timeout value>          for listen/attach in milliseconds n
mutf8=y|n                        output modified utf-8             n
quiet=y|n

Linux | Ubuntu | avtools to the rescue | convert audio-video to audio only (MP3)

Sometimes, you have a nice Audio-Video from which you want to extract only the audio as a .wav file or a .mp3 file. This can be done in Linux with libav-tools

Install libav-tools via apt-get

sudo apt-get install libav-tools
[sudo] password for rahulsaini:
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
libavdevice53 libavfilter3 libavresample1
Suggested packages:
frei0r-plugins
…..
……
Preparing to unpack …/libavdevice53_6%3a9.18-0ubuntu0.14.04.1_i386.deb …
Unpacking libavdevice53:i386 (6:9.18-0ubuntu0.14.04.1) …
…….
Setting up libav-tools (6:9.18-0ubuntu0.14.04.1) …
Processing triggers for libc-bin (2.19-0ubuntu6.6) …
rahulsaini@rahulsaini-UBUNTU:~$ avconv -i /home/rahulsaini/Downloads/AOC.3gp -acodec mp3 -ar 22050 -f wav /home/rahulsaini/Downloads/AOC.mp3
Continue reading

MongoDB startup options, REST and HTTP admin interface

MongoDB has a built-in HTTP based admin interface and a REST based light weight operations interface which can be started with the MongoDB server start up.

When starting MongoDB, just specify the flags

The MongoDB server will start with a web server listening on 28017 (1000 greater than the native init port on which the MongoDB starts by default i.e. 27017)

mongodb –httpinterface –rest

D:\MongoDB3\bin>mongod –httpinterface –rest
2015-08-25T15:28:18.015+0530 I CONTROL  Hotfix KB2731284 or later update is installed, no need to zero-out data files
2015-08-25T15:28:18.033+0530 I JOURNAL  [initandlisten] journal dir=D:\data\db\journal
2015-08-25T15:28:18.034+0530 I JOURNAL  [initandlisten] recover : no journal files present, no recovery needed
2015-08-25T15:28:18.132+0530 I JOURNAL  [durability] Durability thread started
2015-08-25T15:28:18.134+0530 I JOURNAL  [journal writer] Journal writer thread started
2015-08-25T15:28:18.308+0530 I CONTROL  [initandlisten] MongoDB starting : pid=7380 port=27017 dbpath=D:\data\db\ 64-bit host=MYHOST
2015-08-25T15:28:18.309+0530 I CONTROL  [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2015-08-25T15:28:18.310+0530 I CONTROL  [initandlisten] db version v3.0.4
2015-08-25T15:28:18.312+0530 I CONTROL  [initandlisten] git version: 0481c958daeb2969800511e7475dc66986fa9ed5
2015-08-25T15:28:18.314+0530 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.1m-fips 19 Mar 2015
2015-08-25T15:28:18.316+0530 I CONTROL  [initandlisten] build info: windows sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack=’Service Pack 1′) BOOST_LIB_VERSION=1
_49
2015-08-25T15:28:18.318+0530 I CONTROL  [initandlisten] allocator: tcmalloc
2015-08-25T15:28:18.320+0530 I CONTROL  [initandlisten] options: { net: { http: { RESTInterfaceEnabled: true, enabled: true } } }
2015-08-25T15:28:18.332+0530 I NETWORK  [websvr] admin web console waiting for connections on port 28017
2015-08-25T15:28:18.335+0530 I NETWORK  [initandlisten] waiting for connections on port 27017

Just point your browser to http://localhost:28017/ to see the admin console in action

Capture

#mongodb, #nosql

How You Do That (HYDT) | Joining and Merging multiple mp4 Files | Linux | UBUNTU

First we need to install  GPAC , details of which can be found here and for Ubuntu repository we do apt-get with the command as below:

$ sudo apt-get install gpac

GPAC is Open Source Multimedia manipulation library. It can be used for performing many manipulations on multimedia files like AVI, MPG, TS, but mostly on ISO media files (e.g. MP4, 3GP).

GPAC comes bundled with a tool, named MP4Box, using which we can join multiple mp4 files by concatenating into one file without the need for re-encoding the mp4 files.

$ MP4Box -cat Intro01.mp4 -cat Intro02.mp4 -cat Intro03.mp4 OutputIntro.mp4

Credit citation | Original article at this Blog >> here

Linux, The power to run off a cloned OS from external USB Drive

I am loving Linux. Just have a look at this screenshot below, what with Linux Ubuntu 14.4 LTS cloned to an external Disk Drive and running very fine on my DELL XPS 17 with boot from USB.

All the Programming, Social, News, AV prowess and Linux chugs along nice and fine !

I also like the browser like Multiple Tabs that can be opened in the Nautilus File Manager ! Calculator App is also pretty advanced with Unit converter, and Currency Converter built-in it.

I also love the feature of Social Apps Plug-ins right on the desktop. You visit Twitter, Facebook, Google Plus in browser and it prompts to install the desktop app and once installed you get it in the Ubuntu sidebar!

So if you are still not on Linux, get it fast and enjoy your Linux !!!

Kazam_screenshot_00001

Customize Sublime Text Editor Monokai Theme UI

Sublime Text Editor is a very good text editor and with the Monokai Theme it is very easy on eyes and very pleasant to work with.

However, Monokai theme is dark and the currently selected tab in Monokai theme is pretty much dull. Here is a hack to make it bright.

First create a new file called Default.sublime-theme browsing to Preferences Menu > Browse Packages > User (Folder)

Put this text in this (new) Default.sublime-theme file:

[
   {“class”: “tab_control”, “attributes”: [“selected”, “file_medium_dark”],”tint_modifier”:[0, 204, 255, 80]}
]

Then ensure that we use a theme : Default.sublime-theme via Preferences > Settings (Default)

Thats it:

Result. Current Tab is highlighted nice and fine !

CaptureS1