Sign Up to our social questions and Answers to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers to ask questions, answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This promise is immense; every day and every night, we are trying our best to fulfill it by helping others, leaving something worthwhile behind us, and living for a purpose that is "Enrich & Spread knowledge everywhere".
Would you use flashback query to synchronize two schemas as of a certain point in time?
there is two options here : a) use serializable or read only isolation - the database would be consistent. b) use flashback query themselves - mandate that you set undo_retention to "X" and then they can just flashback and get a read consistent version of the database back "X" units in time. anythinRead more
there is two options here :
a) use serializable or read only isolation – the database would be consistent.
b) use flashback query themselves – mandate that you set undo_retention to “X” and then they can just flashback and get a read consistent version of the database back “X” units in time.
anything else does not really make sense. To synchronize the two scheme’s (using flashback) would mean a big bump and grind – AND – would prove that the data they need is flashback queryable – meaning, they didn’t need to copy it, it already exist.
See lessHow do I append an object to an array in JavaScript?
Use the push() function to append to an array:[code]// initialize array var arr = [ "Adam", "panju", "keri" ];// append new value to the array arr.push("oraask");console.log(arr);[/code]Will print["Adam", "panju", "keri", "oraask"]
Use the push() function to append to an array:
[code]// initialize array
var arr = [
“Adam”,
“panju”,
“keri”
];
// append new value to the array
arr.push(“oraask”);
console.log(arr);[/code]
Will print
See lessHow to to check old and new values for item in Oracle Form ?
to get the database value there is one property (database_value) and here is the example to achieve this: [code] BEGIN IF :BLOCK.ITEM = GET_ITEM_PROPERTY('BLOCK.ITEM', database_value) THEN RETURN; END IF; END; [/code] sometimes this property return value (0) if so you can use another way : -take theRead more
to get the database value there is one property (database_value) and here is the example to achieve this:
[code]
BEGIN
IF :BLOCK.ITEM = GET_ITEM_PROPERTY(‘BLOCK.ITEM’, database_value) THEN
RETURN;
END IF;
END;
[/code]
sometimes this property return value (0) if so you can use another way :
-take the value in the pre text item trigger and keep it in global
– as about this value in when validate item trigger and so on
hope this may help you 🙂
See lessHow to return N of rows after ordering in oracle sql ?
You can use a subquery for this like [code] select * from ( select * from emp order by sal desc ) where ROWNUM <= 5; [/code] Starting from Oracle 12c R1 (12.1). there is a syntax available to limit rows or start at offsets (full syntax here) example : [code] SELECT * FROM employees ORDER BY salarRead more
You can use a subquery for this like
[code]
select *
from
( select *
from emp
order by sal desc )
where ROWNUM <= 5;
[/code]
Starting from Oracle 12c R1 (12.1). there is a syntax available to limit rows or start at offsets (full syntax here)
example :
[code]
SELECT *
FROM employees
ORDER BY salary
OFFSET 20 ROWS FETCH NEXT 10 ROWS ONLY;
[/code]
hope this helpful 🙂
See lessHow to create ArrayList from array in Java ?
you can use :[code]List<Integer> intList = new ArrayList<Integer>(Arrays.asList(a));[/code]
you can use :
[code]
See lessList<Integer> intList = new ArrayList<Integer>(Arrays.asList(a));
[/code]
How dbms_assert protects against SQL injection ?
The dbms_assert package is used in databases that don't employ bind variables to help prevent SQL injection attacks, by "sanitizing" the SQL. it has several procedures inside ex : simple_sql_name: Validates the syntax of the SQL to ensure that the SQL statement only contains valid characters and proRead more
The dbms_assert package is used in databases that don’t employ bind variables to help prevent SQL injection attacks, by “sanitizing” the SQL.
it has several procedures inside ex :
and this a simple example of using (dbms_assert.simple_sql_name)
[code]CREATE OR REPLACE PROCEDURE oraask_test (tbl_name VARCHAR2, col_name VARCHAR2)
IS
qry VARCHAR2 (500);
BEGIN
qry := ‘ALTER TABLE ‘ || dbms_assert.simple_sql_name ( :tbl_name) || ‘ ADD ‘ || :col_name || char (1);
EXECUTE IMMEDIATE qry USING col_name;
See lessEND oraask_test;[/code]
How to validate phone number with specific format and fixed length ?
hello, you can use Format mask item property, it will handle the length along with format validation. you may enter this format mask ex: [code] 9"-"999"-"999"-"9999 [/code]
hello,
you can use Format mask item property, it will handle the length along with format validation. you may enter this format mask ex:
[code]
See less9″-“999”-“999”-“9999
[/code]
How to set a checkbox to be “checked” and “uncheck” with JQuery 1.5 & 1.6 ?
jQuery 1.6+ Use the new .prop() method: [code]$('.myCheckbox').prop('checked', true); $('.myCheckbox').prop('checked', false);[/code] jQuery 1.5.x and below The .prop() method is not available, so you need to use .attr(). [code]$('.myCheckbox').attr('checked', true); $('.myCheckbox').attr('checked',Read more
jQuery 1.6+
Use the new .prop() method:
[code]$(‘.myCheckbox’).prop(‘checked’, true);
$(‘.myCheckbox’).prop(‘checked’, false);[/code]
jQuery 1.5.x and below
The .prop() method is not available, so you need to use .attr().
[code]$(‘.myCheckbox’).attr(‘checked’, true);
$(‘.myCheckbox’).attr(‘checked’, false);[/code]
Note that this is the approach used by jQuery’s unit tests prior to version 1.6 and is preferable to using
[code]$(‘.myCheckbox’).removeAttr(‘checked’);[/code]
since the latter will, if the box was initially checked, change the behaviour of a call to .reset() on any form that contains it – a subtle but probably unwelcome behaviour change.
For more context, some incomplete discussion of the changes to the handling of the checked attribute/property in the transition from 1.5.x to 1.6 can be found in the version 1.6 release notes and the Attributes vs. Properties section of the .prop() documentation.
See lessCan i INSERT or UPDATE a table through a view ?
Hello Beter, Views in Oracle may be updateable under specific conditions. It can be tricky, and usually is not advisable. From the Oracle 10g SQL Reference: Notes on Updatable Views An updatable view is one you can use to insert, update, or delete base table rows. You can create a view to be inherenRead more
Hello Beter,
Views in Oracle may be updateable under specific conditions. It can be tricky, and usually is not advisable.
From the Oracle 10g SQL Reference:
Notes on Updatable Views
An updatable view is one you can use to insert, update, or delete base table rows. You can create a view to be inherently updatable, or you can create an INSTEAD OF trigger on any view to make it updatable.
To learn whether and in what ways the columns of an inherently updatable view can be modified, query the USER_UPDATABLE_COLUMNS data dictionary view. The information displayed by this view is meaningful only for inherently updatable views. For a view to be inherently updatable, the following conditions must be met:
In addition, if an inherently updatable view contains pseudocolumns or expressions, then you cannot update base table rows with an UPDATE statement that refers to any of these pseudocolumns or expressions.
If you want a join view to be updatable, then all of the following conditions must be true:
How to validate email address in JavaScript?
Using regular expressions is probably the best way. You can see a bunch of tests here (taken from chromium) [code]function validateEmail(email) { var re = /^(([^<>()[]\.,;:s@"]+(.[^<>()[]\.,;:s@"]+)*)|(".+"))@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}])|(([a-zA-Z-0-9]+.)+[a-zA-Z]{2,}Read more
Using regular expressions is probably the best way. You can see a bunch of tests here (taken from chromium)
[code]function validateEmail(email) {
var re = /^(([^<>()[]\.,;:s@”]+(.[^<>()[]\.,;:s@”]+)*)|(“.+”))@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}])|(([a-zA-Z-0-9]+.)+[a-zA-Z]{2,}))$/;
return re.test(String(email).toLowerCase());[/code]
}
Here’s the example of regular expresion that accepts unicode:
[code]var re = /^(([^<>()[].,;:s@”]+(.[^<>()[].,;:s@”]+)*)|(“.+”))@(([^<>()[].,;:s@”]+.)+[^<>()[].,;:s@”]{2,})$/i;[/code]
But keep in mind that one should not rely only upon JavaScript validation. JavaScript can easily be disabled. This should be validated on the server side as well.
[code]function validateEmail(email) {
var re = /^(([^<>()[]\.,;:s@”]+(.[^<>()[]\.,;:s@”]+)*)|(“.+”))@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}])|(([a-zA-Z-0-9]+.)+[a-zA-Z]{2,}))$/;
return re.test(email);
}[/code]
[code]
function validate() {
var $result = $(“#result”);
var email = $(“#email”).val();
$result.text(“”);
if (validateEmail(email)) {
$result.text(email + ” is valid :)”);
$result.css(“color”, “green”);
} else {
$result.text(email + ” is not valid :(“);
$result.css(“color”, “red”);
}
return false;
}
$(“#validate”).bind(“click”, validate);[/code]
[code]<script src=”https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js”></script>
<form>
<p>Enter an email address:</p>
<input id=’email’>
<button type=’submit’ id=’validate’>Validate!</button>
</form>
<h2 id=’result’></h2>[/code]
See less