Skip to content

Instantly share code, notes, and snippets.

View alifhaikal88's full-sized avatar
💭
I may be slow to respond.

Alif Haikal Razak alifhaikal88

💭
I may be slow to respond.
  • Squickydoodle
  • Germany
View GitHub Profile
@shaik2many
shaik2many / oracle-connectby.sql
Last active April 28, 2019 14:17
All about Oracle connect by
/*
It builds a hierarchical query.
There are 2 components to it:
"start with" -- this identifies all LEVEL=1 nodes in the tree
"connect by" -- describes how to walk from the parent nodes above to their children and their childrens children.
*/
select ename, empno, mgr from emp;
select lpad(' ',level*2,' ')||ename ename,
sys_connect_by_path(business_code, '/') path,
connect_by_isleaf is_leaf,
@madan712
madan712 / ReadWriteExcelFile.java
Created October 18, 2012 14:35
Read / Write Excel file (.xls or .xlsx) using Apache POI
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
@PeeHaa
PeeHaa / arrays.md
Created August 31, 2012 13:34
If I see one more question about arrays in PHP...

Arrays can be seen as lists which can hold information. Arrays in PHP can holds all types of values like scalar values, objects or even other arrays.

Declaring an initializing arrays

First lets see how we can declare an empty array:

<?php
$theArray = array();
@aturgarg
aturgarg / sqlserver-from-command-prompt.bat
Created July 29, 2012 08:42
SQLserver from command prompt
-- to use sqlCmd ( command line sql tool)
-- open command prompt and execute the "sqlcmd.exe" probably located at
-- "C:\Program Files\Microsoft SQL Server\100\Tools\Binn"
> sqlcmd.exe -U username -P password -S .\sqlServer
This will open sql server in cmd
1> select DB_Name()
@tpthn
tpthn / gist:2251509
Created March 30, 2012 13:22
jQuery - .ajax() call example
//load example
p = {
username: username,
ext: ext
};
$('#defUsernameVal').load("<?= site_url('ams/checkUsername') ?>",p);
//post example
$.post("ajax.php", { api: "Report", f: "exportToCsv"},