Tuesday, November 21, 2017

Display Setting is not showing



For show unity setting

$unity-control-center

Setting in command line
$xrandr
...
DVI-I-2 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200     59.95*+
   1600x1200     60.00 
   1280x1024     75.02    60.02 
   1280x960      60.00 
   1152x864      75.00 
   1024x768      75.03    70.07    60.00 
   800x600       75.00    72.19    60.32    56.25 
   640x480       75.00    72.81    59.94 
...
$xrandr --output DVI-I-2 1600x1200 #for choice
$xrandr --fb 1152x768 #another way
For problems in aspect ratio (wide mode), for us the better choice is:
$xrandr --output DVI-I-2 --scale 1.0x0.85


Other alternative is related to create new entry, using next commands

$cvt 1600 1200 60
 # 1600x1200 59.87 Hz (CVT 1.92M3) hsync: 74.54 kHz; pclk: 161.00 MHz
Modeline "1600x1200_60.00"  161.00  1600 1712 1880 2160  1200 1203 1207 1245 -hsync +vsync

$xrand --newmode "1600x1200_60.00"  161.00  1600 1712 1880 2160  1200 1203 1207 1245 -hsync +vsync

$xrand --addmode "1600x1200_60.00"  #but doesn't works for us


Friday, November 17, 2017

How to create war file for tomcat without eclipse



references:
[1] https://stackoverflow.com/questions/1001714/how-to-create-war-files

Wednesday, November 01, 2017

Linux Drive Series/C210

Auxiliary Commands
$ journalctl
$ systemctl
$ alsactl

$ lsof | grep pcm  #still using
$ lsmod | grep snd #modules

$ sudo apt-get remove pulseaudio
$ sudo apt-get remove alsa
$ sudo apt-get install alsa


$ lspci 
Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller

$ lspci -v | grep Audio
$ sudo modprobe snd-hda-intel
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.10.0-37-generic/modules.dep.bin'
modprobe: FATAL: Module snd-hda-intel not found in directory /lib/modules/4.10.0-37-generic

$ vi /etc/modprobe.d/alsa-base.conf  #for verify



*When is right installed
$ cat /proc/asound/card0/codec* | grep Codec
Codec: Realtek ALC887

$ cat /proc/asound/cards
 0 [Intel                ]: HDA-Intel - HDA Intel
 1 [NVidia            ]: HDA-Intel - HDA NVidia
 2 [U0x46d0x825 ]: USB-Audio - USB Device 0x46d:0x825

Upgrade
[*] https://wiki.ubuntu.com/Audio/UpgradingAlsa/DKMS
$ rm -r ~/.config/pulse;
$ pulseaudio -k



Note: try to select previous  version on grub

References
 [1] https://help.ubuntu.com/community/HdaIntelSoundHowto
 [2] https://askubuntu.com/questions/508692/intel-corporation-7-series-c210-series-isnt-being-detected-by-any-module
 






Tuesday, October 31, 2017

Lecture about SoundScape


Acoustic scenes, Acoustic events and Feature aggregation

D-CASE2013

Environment sound recognition using short-time feature aggregation
https://link.springer.com/article/10.1007/s10844-017-0481-4

Task of segmentation
  Speech recognition
  Musical information retrieval(MIR)
  Environment sound
  Survillance
  Index of video content
Task of acoustic events classification
  Statistic large set of features and K-NN
  Feature agregation (Bag of feaures)
  HMM/GMM(better for segementation and annotation for small scales)
  Deep learning
  Blind segmentation and SVM


Recurrence quantification analysis(RQA), RQA Features
Short Time Fourier Transform (STFT)

Lectures Neural Networks


Colour and Texture, but fail for shape.

Generative Adversarial Networks
https://arxiv.org/pdf/1406.2661.pdf

Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks https://junyanz.github.io/CycleGAN/


Thursday, October 26, 2017

PDF Tools & Editors

PDF Annotator

[1] online/free/for signatures https://www.pdfescape.com/

PDF Tools 

$sudo apt-get install pdftk
$pdftk A.pdf cat 1-9 26-end output B.pdf # keep pages 1-9 and 26-end of the original file
 
$pdftk file1.pdf file2.pdf file3.pdf cat output newfile.pdf #join
 
$convert file1.pdf file2.pdf file3.pdf output.pdf #reduce resolution
 
$sudo apt-get install pdfmod #remove pages, works with A4
$sudo apt-get install pdfshuffler #remove pages, works with beamer too
  

PDF Editors

[1] Master PDF Editor http://code-industry.net/
[2] Fonst http://linuxg.net/how-to-install-master-pdf-editor-1-9-on-ubuntu-linux-mint-debian-fedora-opensuse-and-many-other-linux-systems/

[3] xournal, is possible add notes and free text, and [3] have other edition tools.
http://kuboosoft.blogspot.com/2012/07/5-editores-de-pdf-para-linux.html  
 
[4] Extract images from PDF online
http://pdfaid.com/ExtractImages.aspx

[5] How to extract part https://askubuntu.com/questions/221962/how-can-i-extract-a-page-range-a-part-of-a-pdf

Wednesday, October 25, 2017

OpenCV2 in Python for Windows



1.   Below Python packages are to be downloaded and installed to their default locations.
  Python-2.7.x.
  Numpy.
  Matplotlib (Optional).
2.    Install all packages into their default locations. Python will be installed to C:/Python27/.
3.    After installation, open Python IDLE. Enter import numpy and make sure Numpy is working fine.
4.    Download latest OpenCV release from sourceforge site and double-click to extract it.
5.    Goto opencv/build/python/2.7
       Copy cv2.pyd to C:/Python27/lib/site-packages.
6.  Test
>>> import cv2
>>> print cv2.__version__







Tuesday, October 24, 2017

Compiling Windows C++ Project in Linux (wavelet rasterization)

Josiah Manson Codes translate to GNU

Source code:
[*] Windows http://josiahmanson.com/research/wavelet_rasterization/supplemental/wavelet_raster.zip



g++ vect.cpp timer.cpp raster_poly.cpp get_font.cpp global.cpp insert_bez2.cpp insert_line.cpp vect.cpp save.cpp write_grid.cpp main.cpp -Wall -Wextra  -I/usr/include/freetype2 -lfreetype -lpthread -lm -o gnurasterize

_aligned_malloc

void *aligned_alloc(size_t alignment, size_t size);
//Since the question was asked, a new function was standardized by C11
[*] http://en.cppreference.com/w/cpp/memory/c/aligned_alloc
mkdir

#include <sys/types.h>
#include <sys/stat.h>
int result = mkdir("/home/me/test.txt", 0777);

__forceline
[*] https://stackoverflow.com/questions/8897791/how-to-define-forceinline-inline



__declspec

[*] http://gcc.gnu.org/wiki/Visibility
[*] https://stackoverflow.com/questions/2164827/explicitly-exporting-shared-library-functions-in-linux


Time
[*] https://stackoverflow.com/questions/2418157/ubuntu-linux-c-error-undefined-reference-to-clock-gettime-and-clock-settim

Freetype
$ sudo apt-get install libfreetype6-dev
$ g++ ... -I/usr/include/freetype2 -lfreetype

Change FreeImage by PPM
[*] pngwriter https://github.com/pngwriter/pngwriter

[1] PPM Specification http://paulbourke.net/dataformats/ppm/
[2] C/C++ Create PPM File https://rosettacode.org/wiki/Bitmap/Write_a_PPM_file

Related
[1] https://stackoverflow.com/questions/2033997/how-to-compile-for-windows-on-linux-with-gcc-g

Firefox open multiple private window

    /opt/firefox/firefox-bin --profile $(mktemp -d) --private-window www.google.com www.bing.com