String concatenation in oracle

String concatenation is joining one or more string to build a new string. Oracle use [cci]||[/cci] to join two string. [sourcecode lang=”sql”] SELECT ‘semur’ || ‘jengkol’ FROM dual [/sourcecode] Above statement will result string [cci]semurjengkol[/cci]. Note, you must use single quote [cci]'[/cci] to represent a string in oracle or error Read more…

How to get domain name in javascript

Getting domain name from javascript is simple. You can get domain name from [cci]window.location.hostname[/cci] variable. [sourcecode lang=”javascript”] var hostname = window.location.hostname; alert(hostname); [/sourcecode] Click following button to test above code. Get full domain name Domain name you got this way is simply domain name in browser address bar. Sometimes address Read more…

Merge two JSON object in javascript

JSON or JavaScript Object Notation, is a text-based data interchange format. JSON consists of key value pair with comma separated or an array or mixed both of them. Here an example of JSON: [sourcecode lang=”javascript”] var a = {title:’Semurjengkol in the night’, author:’Amir Hamzah’}; [/sourcecode] Variable [cci]a[/cci] is JSON object Read more…

Javascript-Associative Arrays

Bismillahirrohmanirrohim Dalam hal pemrograman, tentu sebagian besar dari kita pernah bahkan seringkali menggunakan array untuk menyimpan data. Dalam javascript, untuk mendeklarasikan sebuah array sangatlah mudah. Perhatikan baris kode berikut: [sourcecode language=”javascript”] var birds = new Array(); birds[] = "Merpati"; birds[] = "Nuri"; birds[] = "Garuda"; [/sourcecode] Selain dengan cara di Read more…