Techy Things

Using Backbone.Validation the correct way for client-side validation 0

Using Backbone.Validation the correct way for client-side validation

Client-side javascript validation using Backbone.Validation (1) Make sure backbone.validation.js and backbone.validation.bootstrap.js are included. backbone.validation.js : https://github.com/thedersen/backbone.validation/blob/master/src/backbone-validation.js backbone.validation.boostrap : https://gist.github.com/driehle/2909552 (2) Make sure your model extends Backbone.Model() and add a validation object to your model after the default declaration : SuperApp.Model = Backbone.Model.extend({ defaults : {...

wrong ELF class: ELFCLASS64 0

wrong ELF class: ELFCLASS64

error while loading shared libraries: libXv.so.1: wrong ELF class: ELFCLASS64 [root@kraken sbin]# ./krakend ./krakend: error while loading shared libraries: libXv.so.1: wrong ELF class: ELFCLASS64 Solution : Either install the 32-bit library missing -or- compile...

R-programming help sheet 0

R-programming help sheet

Create vectors using c() : myvector <- c(“a”, “b”) Create matrixes > m <- matrix(1:4, nrow = 2, ncol = 2) > m [,1] [,2] [1,]    1    3 [2,]    2   ...

Saving the master boot record of hard-disk under Debian 0

Saving the master boot record of hard-disk under Debian

Backup The first line is to backup MBR, the second line is to backup extended partitions (important just as well!!) $> dd if=/dev/sda of=/tmp/backup-sda.mbr bs=512 count=1 $> sfdisk -d /dev/sda > /tmp/backup-sda.sfdisk Restore $>...

How to setup an automated git email notifier server 0

How to setup an automated git email notifier server

  (1) sudo wget http://git.icir.org/git-notifier.git/blob_plain/refs/heads/master:/git-notifier -O /usr/share/git-core/contrib/hooks/git-notifier chmod +x /usr/share/git-core/contrib/hooks/git-notifier (2) Add ssh private key to your .shh folder so git operations dont ask for password. This will be automated. (3) For each new...

Sending mail with java mail javax Mailer encrypted SSL or TLS 0

Sending mail with java mail javax Mailer encrypted SSL or TLS

  This is about sending mail, so we are talking about a SMTP server   The code Properties props = new Properties(); if (Integer.parseInt(port) == 465) // SSL { props.put(“mail.smtp.auth”, “true”); props.put(“mail.smtp.socketFactory.port”, port); props.put(“mail.smtp.socketFactory.class”,...

How to stop auto-indent on WebStorm IDE 0

How to stop auto-indent on WebStorm IDE

Disabling auto-indent on WebStorm WebStorm is quite a different editor than Visual Studio. For one thing it saves automatically files after you make changes. There is no save button ! This can be good...