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!'); | |
} | |
$fp = fopen($_FILES['upload']['tmp_name'], 'rb'); | |
$file_content = fread($fp, filesize($_FILES['upload']['tmp_name'])); | |
fclose($fp); |
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
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
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_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_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 umur > 25 | |
order by umur | |
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 umur > 25 | |
order by umur |
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 * from person_cluster | |
where id between 1 and 54 | |
order by id |