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
<head> | |
<script src="http://code.jquery.com/jquery-1.8.3.js"></script> | |
<script> | |
$(function(){ | |
$('.toggle').click(function(){ | |
//$('#my_content').toggle(); | |
$(this).toggleClass('toggled'); | |
}); | |
}) | |
</script> |
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
INSERT INTO table1(column1, column2, ...) | |
SELECT column3, column4, ... | |
FROM table2 | |
--Read more: http://www.1keydata.com/sql/sql-insert-into-select.html#ixzz2HUbbJ4vR | |
INSERT INTO table1 | |
SELECT * FROM table1@dev; --if the column order match |
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
SELECT to_char(sysdate, 'YYYY') FROM dual; |
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
function getSearchResultsSP(tax_year, search_str, user_id, sys_id, sys_privs) { | |
sp = new storedproc(); | |
sp.setDatasource(Application.DSN_GDX); | |
sp.setProcedure("PKG_GAIN_LOSS.GET_SEARCH_RESULTS"); | |
sp.addParam(TYPE = "IN", CFSQLTYPE="CF_SQL_INTEGER", VALUE=tax_year, DBVARNAME="P_TAX_YEAR"); | |
sp.addParam(TYPE = "IN", CFSQLTYPE="CF_SQL_VARCHAR", VALUE=search_str, DBVARNAME="p_search_str"); | |
sp.addParam(TYPE = "IN", CFSQLTYPE="CF_SQL_VARCHAR", VALUE=user_id, DBVARNAME="p_userId"); | |
sp.addParam(TYPE = "IN", CFSQLTYPE="CF_SQL_VARCHAR", VALUE=sys_id, DBVARNAME="p_sysId"); | |
sp.addParam(TYPE = "IN", CFSQLTYPE="CF_SQL_VARCHAR", VALUE=sys_privs, DBVARNAME="p_sysPrivs"); |
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
--Source Article/Blog | |
--http://decipherinfosys.wordpress.com/2009/06/22/mutating-tabletrigger-error-and-how-to-resolve-it/ | |
Mutating table/trigger error and how to resolve it | |
Posted by decipherinfosys on June 22, 2009 | |
Most of us who have worked in Oracle have encountered ORA-04091 (table xxx is mutating. Trigger/function might not see it) at some time or the other during the development process. In this blog post, we will cover why this error occurs and how we can resolve it using different methodology. | |
Mutating error normally occurs when we are performing some DML operations and we are trying to select the affected record from the same trigger. So basically we are trying to select records in the trigger from the table that owns the trigger. This creates inconsistency and Oracle throws a mutating error. Let us take a simple scenario in which we have to know total number of invalid objects after any object status is updated to ‘INVALID’. We will see it with an example. First let us create a table and then |
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
//Note: You dont need a quote | |
var str = "<tr><td></td><td></td><td></td><td></td></tr>"; | |
$("[id$=line1Props] tr:last").after(str); |
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
/** | |
* http://www.mkyong.com/java/java-object-sorting-example-comparable-and-comparator/ | |
*/ | |
//1. Sort an Array | |
String[] fruits = new String[] {"Pineapple","Apple", "Orange", "Banana"}; | |
Arrays.sort(fruits); | |
int i=0; | |
for(String temp: fruits){ | |
System.out.println("fruits " + ++i + " : " + temp); |
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
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<script> | |
$(function() { | |
$("a").click(function(e) { | |
alert("Hello World!"); | |
e.preventDefault(); | |
}); | |
}); |
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
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<script> | |
$(function() { | |
$("#mybutton").click(function() { | |
alert($("#myform").serialize()); | |
}); | |
$("#myname").change(function(){ | |
if(this.value.length<5)$("#namerror").html("Name should be at least 5 chars") |
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
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> | |
<script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script> | |
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" /> | |
<script> | |
$(document).ready(function() {//$(function(){ | |
$('input[type=checkbox]').click(function() { | |
var ischeck = this.checked | |
path = $(this).attr('path') |