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
<div id = "printThisDiv"> | |
This part of the page will only be printed!!! | |
</div> | |
<input type = "button" value = "Print" | |
onclick = "JavaScript:printSpecificDiv('printThisDiv');" /> | |
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 printSpecificDiv(divID) { | |
var divElements = document.getElementById(divID).innerHTML; | |
var wholePage = document.body.innerHTML; | |
document.body.innerHTML = "<html><head><title></title></head><body>" | |
+ divElements + "</body>"; | |
window.print(); | |
document.body.innerHTML = wholePage; | |
return false; | |
} |
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 printSpecificDiv(divId) { | |
var printContent = document.getElementById(divId); | |
var windowUrl = 'about:blank'; | |
var windowName = 'Print' + new Date().getTime(); | |
var printWindow = window.open(windowUrl, windowName, | |
'left = 10000, top = 10000, width = 0, height = 0'); | |
printWindow.document.write(printContent.innerHTML); | |
printWindow.document.close(); | |
printWindow.focus(); | |
printWindow.print(); |
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
public int myRecursive (int jVariable){ | |
System.out.println(jVariable); | |
jVariable--; | |
if(jVariable == 0) //Stopping Point | |
return 0; | |
return myRecursive(jVariable); | |
} |
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
public int myRecursive(){ | |
int myRecursive(); | |
} |
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
Private static int index = 0; | |
public static void main (String[] args){ | |
int n1 = 0; | |
int n2 = 1; | |
System.out.println(“index: “ + index + “ = “ + n1); | |
fibonacci(n1, n2); | |
} | |
public static void fibonacci(int n1, int n2){ | |
System.out.println(“index: “ + index + “ = “ + n2); | |
if (index == 20){ //Stopping point. |
NewerOlder