$ heroku login
$ heroku keys:add
Type in one input field and show in other input field realtime. Also replace non alpha numeric with empty space and replace space with underscore.
$('body').on('keyup', '.input-label', function(event) {
var me = $(this);
var valOfme = me.val();
valOfme = valOfme.replace(/[^a-zA-Z 0-9]+/g,'').replace(/\s+/g,'_');
me.closest('tr').find('input.input-field').val(valOfme);
});
//to safely serialize | |
$safe_string_to_store = base64_encode(serialize($multidimensional_array)); | |
//to unserialize... | |
$array_restored_from_db = unserialize(base64_decode($encoded_serialized_string)); | |
// to update serialized data | |
$data = unserialize($serializedData); | |
if(array_key_exists('key', $data) { | |
$data['key'] = 'New Value'; |
#Install dependencies
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
#Install Ruby with rbenv
<?php | |
class Eksport extends CI_Controller { | |
function export() { | |
$file_name = "Nama file.xls"; | |
header("Content-type: application/vnd.ms-excel"); | |
header("Content-Disposition: attachment; filename={$file_name}"); | |
header("Expires: 0"); | |
header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); | |
$data = array( |
// author http://stackoverflow.com/users/112407/rune-fs | |
$("div.id_100 option:selected").prop("selected",false); | |
$("div.id_100 option[value=" + value + "]").prop("selected",true); |