Tags | |
UUID | 9d8dc474-abe2-11e4-a9fb-bc764e2038f2 |
WYSIWYG Editor Input Template#retrieveSetting('showcomments' $settingValue) #retrieveSetting('showattachments' $settingValue) #retrieveSetting('showhistory' $settingValue) #retrieveSetting('showinformation' $settingValue) #retrieveSetting('showannotations' $settingValue) //
//
function fireHTMLEvent(element, eventType, bubbles, cancelable) {
if (element.ownerDocument.createEvent) {
// Standards compliant.
var event = element.ownerDocument.createEvent('HTMLEvents');
event.initEvent(eventType, bubbles, cancelable);
return !element.dispatchEvent(event);
} else if (document.createEventObject) {
// IE
var event = element.ownerDocument.createEventObject();
return element.fireEvent('on' + eventType, event);
}
}
/**
* We fire the load event on the rich text area as soon as the DOM is ready. We don't rely on the DOMContentLoaded event
* because the listeners are lost when the window is reloaded. For instance, if we submit a page to itself (form
* action is the empty string) or if we call window.location.reload(true) the DOMContentLoaded event listeners are lost
* and there's no clean way to register them back after the window unloads but before the DOMContentLoaded event is fired.
*
* NOTE: The editor ignores the second load event which is fired by the browser after all the external resources like
* images and embedded objects are loaded.
*/
function fireContentLoad(contentLoadTriggerId) {
// Remove the script that called this function to prevent it from being saved with the rest of the content. The script
// was placed at the end of the body in order to be interpreted immediately after the content is loaded.
var contentLoadTrigger = document.getElementById(contentLoadTriggerId);
contentLoadTrigger.parentNode.removeChild(contentLoadTrigger);
// Check if this page was loaded inside an in-line frame element.
if (window.frameElement) {
fireHTMLEvent(window.frameElement, 'load', false, false);
}
}
//
//This equation solves a system of simultaneous linear equations in two variables using Cramer's Rule.
The two equations solved for here are of the form:
a1⋅x+b1⋅y=c1
a2⋅x+b2⋅y=c2
Given a system of simultaneous equations:
a1⋅x+b1⋅y=c1
a2⋅x+b2⋅y=c2
We can represent these two equation in matrix form using a coefficient matrix, as [a1b1a2b2][xy]=[c1c2], where we refer to [a1b1a2b2] as the coefficient matrix.
Using Cramer's rule we compute the determinants of the coefficient matrix: D=|a1b1a2b2|=a1⋅b2-b1⋅a2
We also form the Dy determinants as:
Dy=|a1c1a2c2|
Continuing with Cramer's Rule, we compute the value of y as:
y=DyD
No comments |