How to install oracle developer in vista
http://jithendra-g.blogspot.com/2008/04/installing-oracle-developer-suite-10g.html
sharing some tech problems and soln
http://jithendra-g.blogspot.com/2008/04/installing-oracle-developer-suite-10g.html
Posted by Sajjad at 12:30 pm 0 comments
Labels: Developer suite, Oracle, vista
Navigation-> Right Click My computer -> Properties -> Advanced system Settings -> Under Performance, click on settings -> Under advanced tab, under Virtual Memory click on Change
Posted by Sajjad at 2:03 am 0 comments
Labels: vista
global $db;
$table=$db->prefix("topics");
$rt= new XoopsTopic($table,0);
$topics=$rt->getAllChildTopics();
?>
Posted by Sajjad at 1:36 am 0 comments
Labels: runcms
Posted by Sajjad at 6:38 pm 2 comments
Labels: DBMS_OUTPUT, Oracle, serveroutput
Posted by Sajjad at 6:36 pm 0 comments
select LEVEL,ID,NAME,REPORT_TO
from top_dogs
START WITH report_to IS NULL
CONNECT BY PRIOR id=report_to
select LPAD(NAME,length(NAME)+LEVEL*2,'_')
from top_dogs
START WITH report_to IS NULL
CONNECT BY PRIOR id=report_to
Posted by Sajjad at 1:40 am 0 comments
select * from (select * from top_dogs order by salary DESC)where ROWNUM<=3
top 3 salary earners
Posted by Sajjad at 1:46 am 0 comments
Drag and drop Menu using Tool-man+php
1) Download tool-man new version(http://tool-man.org)
2) Edit tool-man\source\org\tool-man\core.js
modify function inspectListOrder in ToolMan._junkdrawer
inspectListOrder_ret : function(id) {
return(ToolMan.junkdrawer().serializeList(document.getElementById(id)))
},
3)Modify sorting.html
<link rel="stylesheet" type="text/css" href="../../tool-man/examples/common/common.css"/>
<link rel="stylesheet" type="text/css" href="../../tool-man/examples/common/lists.css"/>
<style type="text/css"><!--
ul.boxy li { margin: 0px; }
#phonetics td {
margin: 0px;
padding: 0px 1em;
vertical-align: top;
width: 100px;
}
//-->
</style>
<script language="JavaScript" type="text/javascript" src="../../tool-man/source/org/tool-man/core.js"></script>
<script language="JavaScript" type="text/javascript" src="../../tool-man/source/org/tool-man/events.js"></script>
<script language="JavaScript" type="text/javascript" src="../../tool-man/source/org/tool-man/css.js"></script>
<script language="JavaScript" type="text/javascript" src="../../tool-man/source/org/tool-man/coordinates.js"></script>
<script language="JavaScript" type="text/javascript" src="../../tool-man/source/org/tool-man/drag.js"></script>
<script language="JavaScript" type="text/javascript" src="../../tool-man/source/org/tool-man/dragsort.js"></script>
<script language="JavaScript" type="text/javascript" src="../../tool-man/source/org/tool-man/cookies.js"></script>
<script language="JavaScript" type="text/javascript"><!--
var dragsort = ToolMan.dragsort()
var junkdrawer = ToolMan.junkdrawer()
window.onload = function() {
junkdrawer.restoreListOrder("numeric")
junkdrawer.restoreListOrder("phonetic1")
junkdrawer.restoreListOrder("phonetic2")
junkdrawer.restoreListOrder("phonetic3")
dragsort.makeListSortable(document.getElementById("numeric"),
verticalOnly, saveOrder)
dragsort.makeListSortable(document.getElementById("phonetic1"),
verticalOnly, saveOrder)
dragsort.makeListSortable(document.getElementById("phonetic2"),
verticalOnly, saveOrder)
dragsort.makeListSortable(document.getElementById("phonetic3"),
verticalOnly, saveOrder)
}
function verticalOnly(item) {
item.toolManDragGroup.verticalOnly()
}
function speak(id, what) {
var element = document.getElementById(id);
element.innerHTML = 'Clicked ' + what;
}
function saveOrder(item) {
var group = item.toolManDragGroup
var list = group.element.parentNode
var id = list.getAttribute("id")
if (id == null) return
group.register('dragend', function() {
ToolMan.cookies().set("list-" + id,
junkdrawer.serializeList(list), 365)
})
}
//-->
</script>
4) write the code for list menu item
<ul id="numeric">
</ul>
<?
$sql_t="SELECT * FROM $table_t
WHERE `position` = 'right' order by `order`";
$rest=$db->query($sql_t);
?>
<table id="phonetics">
<tr>
<td>
<ul id="phonetic1" class="boxy">
<?
while($arr=$db->fetch_array($rest))
{
?>
<li id="<?=$arr[id]?>"><div align="right"><?= $arr[name]?></div></li>';
<?
}
?>
</ul>
<form method="post" action="menu_save.php" name="save_form">
<input type="hidden" name="ord" id="ord" />
<input type="hidden" name="action" value="menu_order"/>
<input type="button" value="íÑÓá" onClick="javascript:save_menu()" />
</form>
5)write save menu function
<script language="javascript" type="text/javascript">
function save_menu()
{
var sd=junkdrawer.inspectListOrder_ret('phonetic1');
//alert(sd);
var control = document.getElementById("ord");
control.value=sd;
//document.save_form.action="http://localhost/search.php?s="+sd.toString();
document.save_form.submit();
}
</script>
6)Process/ save the manu in php
$ord=explode("|",$_POST["ord"]);
foreach($ord as $key=>$value)
{ $sql="UPDATE $table SET `order`=".($key+1)." where id=".$value;
$result=$db->query($sql);
}
Posted by Sajjad at 8:55 pm 0 comments
Labels: DHTML, Drag and Drop, java script, menu, php
SQL> VARIABLE RESULT NUMBER;
SQL> BEGIN
2 SELECT max(salary) INTO :RESULT FROM top_dogs;
3 END;
4 /
PL/SQL procedure successfully completed.
SQL> print RESULT;
RESULT
----------
250000
SQL>
Posted by Sajjad at 8:49 pm 0 comments
Labels: PL/SQL
include_once(XOOPS_ROOT_PATH."/class/xoopsobject.php");
include_once(XOOPS_ROOT_PATH."/class/xoopsuser.php");
include_once(XOOPS_ROOT_PATH."/include/functions.php");
$name=$_REQUEST["name"];
$uname=$_REQUEST["uname"];
$passwd=$_REQUEST["passwd"];
$shapwd = rc_shatool($uname.$passwd);
$user= new XoopsUser();
$user->setVar("name", $name,true);
$user->setVar("uname", $uname,true);
$user->setVar("pass", $shapwd,true);
$user->setVar("level",1,true);
$user->store();
Posted by Sajjad at 1:15 am 0 comments
Labels: runcms
include_once(XOOPS_ROOT_PATH.'/class/fckeditor/fckeditor.php');
$runFCKeditor = new FCKeditor('content');
$runFCKeditor->BasePath = XOOPS_URL."/class/fckeditor/";
//$runFCKeditor->create();
if ($runFCKeditor->IsCompatible() && $editorConfig["displayeditor"] == 1 && $editorConfig["displayforuser"] == 1 && $xoopsUser)
{
$runFCKeditor->EchoEditArea('content', $news->hometext);
//$runFCKeditor->create();
}
Posted by Sajjad at 9:01 pm 0 comments
global $db;
$table=$db->prefix("topics");
$rt= new XoopsTopic($table,0);
$topics=$rt->getAllChildTopics();
foreach($topics as $topic)
{
echo $topic->topic_id;
echo $topic->topic_title;
}
Posted by Sajjad at 8:35 pm 0 comments
Labels: runcms
Ubiquity for Firefox from Aza Raskin on Vimeo.
Posted by Sajjad at 1:25 pm 0 comments
Labels: web 2.0
Posted by Sajjad at 12:07 pm 0 comments
Labels: runcms
Posted by Sajjad at 11:11 am 0 comments
Posted by Sajjad at 1:24 pm 0 comments
Labels: runcms
include_once("./mainfile.php");
include_once(XOOPS_ROOT_PATH."/header.php");
-- Contents -----
include_once("footer.php");
Posted by Sajjad at 1:15 pm 0 comments
Labels: runcms
function save_ini($key,$value)
{
$ini_array = parse_ini_file("d.ini");
$ini_array[$key]=$value;
write_ini_file("d2.ini", $ini_array);
}
Posted by Sajjad at 1:27 pm 0 comments
function write_ini_file($path, $assoc_array) {
foreach ($assoc_array as $key => $item) {
if (is_array($item)) {
$content .= "\n[$key]\n";
foreach ($item as $key2 => $item2) {
$content .= "$key2 = \"$item2\"\n";
}
} else {
$content .= "$key = \"$item\"\n";
}
}
if (!$handle = fopen($path, 'w')) {
return false;
}
if (!fwrite($handle, $content)) {
return false;
}
fclose($handle);
return true;
}
Posted by Sajjad at 1:10 pm 0 comments
function prev_pg($current_page,$url)
{
for($i=1;$i<$current_page;$i++)
{
echo " ".$i."|";
}
}
function next_pg($current_page,$url,$total_set,$limits)
{
$total_pages=($total_set/$limits)+1;
for($i=$current_page;$i<=$total_pages;$i++)
{
echo " ".$i."|";
}
}
if(isset($_POST["page_no"]))
$page=$_POST["page_no"];
else
$page=1;
$start=$page-1;
$limits=10;
$sql="SELECT `*` FROM ------------- ";
$name1=mysql_query($sql);
$total_set=mysql_num_rows($name1)
$sql="SELECT -------------------- LIMIT $start ,$limits";
$name=mysql_query($sql);
$row=mysql_fetch_array($name);
prev_pg($page,"tariff.php");
next_pg($page,"tariff.php",$total_set,$limits);
Posted by Sajjad at 5:35 pm 0 comments
function LTrim( value ) {
var re = /\s*((\S+\s*)*)/;
return value.replace(re, "$1");
}
// Removes ending whitespaces
function RTrim( value ) {
var re = /((\s*\S+)*)\s*/;
return value.replace(re, "$1");
}
// Removes leading and ending whitespaces
function trim( value ) {
return LTrim(RTrim(value));
}
Posted by Sajjad at 12:56 pm 0 comments
Labels: java script, trim
function replace(string,text,by) {
// Replaces text with by in string
var strLength = string.length, txtLength = text.length;
if ((strLength == 0) || (txtLength == 0)) return string;
var i = string.indexOf(text);
if ((!i) && (text != string.substring(0,txtLength))) return string;
if (i == -1) return string;
var newstr = string.substring(0,i) + by;
if (i+txtLength < strLength)
newstr += replace(string.substring(i+txtLength,strLength),text,by);
return newstr;
}
Posted by Sajjad at 5:18 pm 0 comments
Labels: java script
function dict($english)
{
$ini_array = parse_ini_file("d.ini");
return($ini_array[$english]);
}
Posted by Sajjad at 1:55 pm 0 comments
meta equiv="content-type" content="text/html; charset=windows-1256"
meta equiv="content-language" content="ar">
Posted by Sajjad at 3:54 pm 0 comments
Labels: html
meta equiv="content-type" content="text/html; charset=windows-1256"
meta equiv="content-language" content="ar">
Posted by Sajjad at 3:54 pm 0 comments
Labels: html
function CallPrint(strid){
var prtContent = document.getElementById(strid);var WinPrint =window.open('','','left=0,top=0,width=1,height=1,t oolbar=0,scrollbars=0,status=0');WinPrint.document.write(prtContent.innerHTML);WinPrint.document.close();WinPrint.focus();WinPrint.print();WinPrint.close();prtContent.innerHTML=strOldOne;}
Posted by Sajjad at 3:47 pm 2 comments
Labels: html, java script