This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$con = mssql_pconnect("server","user","pass"); | |
if (!$con || !mssql_select_db('database', $con)) { | |
die('Unable to connect or select database!'); | |
} | |
$sql = "SELECT type, data FROM FILES WHERE name = '".$namefile."'"; | |
$res = mssql_query($sql,$con); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$objPHPExcel->disconnectWorksheets(); | |
unset($objPHPExcel); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String url = p2.encodeURL(p1.getContextPath()+"/AppContext/img/display.jsp"); | |
String[] urltemp = url.split("&"); | |
for(int i=0;i<urltemp.length;i++){ | |
String uTemp = urltemp[i]; | |
if(uTemp.trim().substring(0, 8).equals("wsrp-url")){ | |
url = uTemp.replaceAll("wsrp-url=", ""); | |
url = url.replaceAll("%3A", ":"); | |
url = url.replaceAll("%2F", "/"); | |
break; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE FUNCTION [dbo].[LEVENSHTEIN]( @s NVARCHAR(MAX), @t NVARCHAR(MAX) ) | |
/* | |
Levenshtein Distance Algorithm: TSQL Implementation | |
by Joseph Gama | |
http://www.merriampark.com/ldtsql.htm | |
Returns the Levenshtein Distance between strings s1 and s2. | |
Original developer: Michael Gilleland http://www.merriampark.com/ld.htm | |
Translated to TSQL by Joseph Gama |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"> | |
<meta content="utf-8" http-equiv="encoding"> | |
<title>Graph2d | Basic Example</title> | |
<style type="text/css"> | |
body, html { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package dicoba; | |
/** | |
* | |
* @author radity | |
*/ | |
public class Dicoba { | |
public String masukin(){ | |
return "hello"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE [dbo].[person_cluster]( | |
[id] [int] IDENTITY(1,1) NOT NULL, | |
[nama] [varchar](50) NOT NULL, | |
[umur] [int] NOT NULL, | |
CONSTRAINT [PK_person_cluster] PRIMARY KEY CLUSTERED | |
( | |
[id] ASC | |
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | |
) ON [PRIMARY] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use clustered_vs_non_clustered | |
set statistics IO on | |
SET STATISTICS TIME ON | |
select top 10000 * from person_non_cluster | |
where id > 21 | |
order by id | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use clustered_vs_non_clustered | |
set statistics IO on | |
SET STATISTICS TIME ON | |
select top 10000 * from person_cluster | |
where id > 21 | |
order by id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use clustered_vs_non_clustered | |
set statistics IO on | |
SET STATISTICS TIME ON | |
select top 10000 * from person_cluster | |
where umur > 25 | |
order by umur | |