Jumat, 02 Desember 2016

Problem can't find -lgfortran

Just make sure you:
gcc --version
And
gfortan --version
Is the same.
/usr/bin/ 
Contains the different versions.
Eg: If gcc--version returns 4.7.3 and gfortran --version 4.8, a simple hack could be to do the following.
sudo cp /usr/bin/gcc-4.8 /usr/bin/gcc

Rabu, 30 November 2016

Problem updating R

  • Explaining the issue
    Setting up r-base-core (3.3.2-1trusty0) ...
    Preserving user changes to /usr/share/bash-completion/completions/R (renamed from /etc/bash_completion.d/R)...
    mv: cannot stat ‘/usr/share/bash-completion/completions/R’: No such file or directory
    dpkg: error processing package r-base-core (--configure):
     subprocess installed post-installation script returned error exit status 1
    
    The post-installation script (/var/lib/dpkg/info/r-base-core.postinst) didn't check if /usr/share/bash-completion/completions/R file exist before trying to move it.
  • Quick fix / Workaround
    1. Just create copy of the file.
      sudo cp /etc/bash_completion.d/R /usr/share/bash-completion/completions/R
      
    2. Fix the interrupted installation
      sudo apt-get -f install
      
  • Definitive fix
    As bodhi.zazen said, raise a bug report to the project.

Sabtu, 08 Oktober 2016

How to Import JavaCV libraries to Android Project

If you haven't yet installed the Android Development Environment, you can follow this link which contains everything you need to get started quickly. Watch the tutorial video and follow the instructions underneath to install Eclipse, the Integrated Development Environment (IDE) for Android development and create a new project.

Once you have installed everything and have created the project, use the following procedure to import JavaCV libraries to the Android project:
  1. Download the JavaCv libraries:
    a. From this link download "javacv-0.7-bin.zip" and extract the files:
    - javacpp.jar
    - javacv.jar
    - javacv-android-arm.jar
    b. From this link download "javacv-0.7-cppjars.zip" and extract the files:
    - opencv-2.4.8-android-arm.jar
    -  ffmpeg-2.1.1-android-arm.jar

  2. Go to File > New > Folder, select your project as parent folder, type "libs/armeabi" as Folder name, and click Finish.

  3. Copy javacpp.jar and javacv.jar into the "libs" folder.

  4. Extract all the *.so files from javacv-android-arm.jar, opencv-2.4.8-android-arm.jar, and ffmpeg-2.1.1-android-arm.jar directly into the "libs/armeabi" folder, without creating any of the subdirectories found in the JAR files. (The easiest way to extract the .so files from the .jar is by using 7-ZIP software which can be downloaded here).

  5. Navigate to Project > Properties > Java Build Path > Libraries and click "Add JARs...".

  6. Select both javacpp.jar and javacv.jar from the "libs" folder.

Finally,import JavaCV functions to your code
import static com.googlecode.javacv.cpp.opencv_core.*;
import static com.googlecode.javacv.cpp.opencv_imgproc.*;
import static com.googlecode.javacv.cpp.opencv_highgui.*;
and use some sample code to check that everything is working correctly.

Jumat, 16 September 2016

Find Out Ram Speed, Make, Form Factor, Type and Other Information

Find Out Ram Speed, Make, Form Factor, Type and Other Information

You need to use the dmidecode command:
# dmidecode --type 17
OR
# dmidecode --type memory
OR
# dmidecode -t 17
Sample outputs:
 # dmidecode 2.11
SMBIOS 2.5 present.
Handle 0x0017, DMI type 17, 27 bytes
Memory Device
 Array Handle: 0x0016
 Error Information Handle: No Error
 Total Width: 72 bits
 Data Width: 64 bits
 Size: 2048 MB
 Form Factor: DIMM
 Set: 1
 Locator: DIMM1A
 Bank Locator: Bank1
 Type: DDR2
 Type Detail: Synchronous
 Speed: 667 MHz
 Manufacturer: 5185
 Serial Number: 05009F22
 Asset Tag: Not Specified
 Part Number: 72T232220HFA3SB

Features for: 99U5428-018.A00LF RAM 8 GB DDR3L 1600 Mhz 1.35 V Kingston Kingston

Allgemeine Daten

Condition

 NEW

Technical Data

Capacity

 8 GB

Typ

 DDR3L-RAM

Memory modul

 PC3L-12800

Clockrate (MHz)

 1600 MHz

Number of memory chips

 

Sabtu, 23 Juli 2016

Install atom di linux

sudo add-apt-repository ppa:webupd8team/atom sudo apt-get update sudo apt-get install atom

install ionic

Installation

In this chapter, we are going to walk through the process of downloading Ionic and installing all necessary dependencies for development.

Platform notes

First, we need to start with a note about minimum requirements for building your app with the current release of Ionic. Ionic targets iPhone and Android devices (currently). We support iOS 7+, and Android 4.1+. However, since there are a lot of different Android devices, it’s possible certain ones might not work. As always, we are looking for help testing and improving our device compatibility and would love help from the community on our GitHub project.
You can develop Ionic apps on any operating system you prefer. In fact, Ionic has been developed at various times on Mac OS X, Linux, and Windows. However, right now you’ll need to use the command line in order to follow this guide and you must have OS X in order to develop and deploy iPhone apps, so OS X is recommended if possible.
If you are on Windows, make sure to download and install Git for Windows and optionally Console2. You will be executing any commands in this guide in the Git Bash or Console2 windows.
First, we will go and install the most recent version of Apache Cordova, which will take our app and bundle it into a native wrapper to turn it into a traditional native app.
sudo apt-get install npm

To install Cordova, make sure you have Node.js installed, then run
$ sudo npm install -g cordova
Drop sudo from the above command if running on Windows. Depending on the platforms you wish to develop for, you’ll need to install platform-specific tools. Follow the Cordova platform guides for Android and iOS to make sure you have everything needed for development on those platforms. Luckily, you’ll only need to do this once.

Install Ionic

Ionic comes with a convenient command line utility to start, build, and package Ionic apps.
To install it, simply run:
$ sudo npm install -g ionic

Create the project

Now, we need to create a new Cordova project somewhere on the computer for the code for our app:
$ ionic start todo blank
That will create a folder called todo in the directory the command was run. Next, we will go into that directory and list the contents. Here is what the outer structure of your Ionic project will look like:
$ cd todo && ls

├── bower.json     // bower dependencies
├── config.xml     // cordova configuration
├── gulpfile.js    // gulp tasks
├── hooks          // custom cordova hooks to execute on specific commands
├── ionic.project  // ionic configuration
├── package.json   // node dependencies
├── platforms      // iOS/Android specific builds will reside here
├── plugins        // where your cordova/ionic plugins will be installed
├── scss           // scss code, which will output to www/css/
└── www            // application - JS code and libs, CSS, images, etc.
If you are planning on using any version control system, you can go ahead and set it up in this new folder.

Configure Platforms

Now, we need to tell ionic that we want to enable the iOS and Android platforms. Note: unless you are on MacOS, leave out the iOS platform:
$ ionic platform add ios
$ ionic platform add android
If you see errors here, make sure to follow the platform guides above to install necessary platform tools.

Test it out

Just to make sure the default project worked, try building and running the project (substitute ios for android to build for Android instead):
$ ionic build ios
$ ionic emulate ios

Install Ionic on Linux (Linux mint 17.1 rebecca)

The first step is to install NodeJS
sudo apt-get install nodejs
The nodejs installed from the repositories use nodejs, since we may need node, we create a symlink so we can use both
sudo ln -s /usr/bin/nodejs /usr/bin/node
We also need to install ant
sudo apt-get install ant
Now we will install ionic and cordoba
sudo npm install -g cordova ionic
Change the ownership of tmp folder created by npm, replace user:group by your username group
sudo chown user:group ~/tmp/
You need android sdk installed, and to add this lines to the file ~/.bashrc, change /opt/android/sdk by the path your are installing
export ANDROID_HOME=/opt/android/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Install gulp
sudo npm install -g gulp
if your are going to use SASS we should install ruby
sudo apt-get install ruby
sudo su -c "gem install sass"
Now you can start your proyect like
ionic start myApp blank
cd myApp/
ionic platform add android
ionic build android
ionic emulate android

Jumat, 22 Juli 2016

Check package open cv di linux

abuzupaw@BSG:~$ pkg-config --cflags opencv
-I/usr/local/include/opencv -I/usr/local/include

abuzupaw@BSG:~$ pkg-config --libs opencv
-L/usr/local/lib -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_nonfree -lopencv_objdetect -lopencv_ocl -lopencv_photo -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videostab -lrt -lpthread -lm -ldl

Jumat, 15 Juli 2016

Entry True type font in linux

Install a font is not difficult! After you have downloaded the font, extract it in a folder (the fonts are generally in a zip archive) then open a terminal in the folder where is your font then in this folder, type in the terminal (of course you must be root for this):


CODE: SELECT ALL
# mkdir -v /usr/share/fonts/myfonts (of course you can give another name than "myfonts")
# mv nameofyourfont.ttf /usr/share/fonts/myfonts/
# cd /usr/share/fonts/myfonts/
# mkfontdir
# mkfontscale
# fc-cache -f -v


And hop, your fonts are incorporated to the system. After the last command, verify if you see the line:

/usr/share/fonts/myfonts: caching, 1 fonts, 0 dirs

It says you the font is available.

Then now, you can remove the folder where you have extract the font at first.

In this way, you can install any TrueType (.ttf) fonts found on the web...

P.S.= If you have several fonts, it's the same thing. The most simple is to put all the fonts in the same folder, so the second command will be:

CODE: SELECT ALL
mv *.ttf /usr/share/fonts/myfonts

Then, following is the same.
K.I.S.S. ===> "Keep It Simple, Stupid"
"Simplicity is the ultimate sophistication." (Leonardo da Vinci)
"Everything should be made as simple as possible, but no simpler." (Albert Einstein)

Selasa, 14 Juni 2016