This file contains hidden or 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. |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| var count = 0; | |
| var countButton = document.getElementById("countButton"); | |
| var displayCount = document.getElementById("displayCount"); | |
| countButton.onclick = function(){ | |
| count++; | |
| displayCount.innerHTML = count; | |
| } | |
| resetButton.onclick = function(){ | |
| count = 0; | |
| displayCount.innerHTML = count; |
This file contains hidden or 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
| $("#countButton").on('click', function(e) { | |
| if (typeof(Storage) !== "undefined") { | |
| if (localStorage.clickcount) { | |
| localStorage.clickcount = parseInt($("#displayCount").text()); | |
| localStorage.clickcount = Number(localStorage.clickcount) + 1; | |
| } else { | |
| localStorage.clickcount = 0; | |
| } | |
| document.getElementById("displayCount").innerHTML = localStorage.clickcount; | |
| } else { |
This file contains hidden or 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> | |
| var hoverCount = 1; | |
| </script> | |
| </head> | |
| <body> | |
| <div style="text-align: center;"> | |
| <button class="hoverButton" type='button' | |
| onmouseover='alert ("Hovered " + hoverCount +" times."); |
This file contains hidden or 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
| // ==UserScript== | |
| // @name Twitter Cramming | |
| // @description Force enable cramming (280 character tweets) on Twitter | |
| // @author Prof. 9 | |
| // @version 0.1 | |
| // @match https://twitter.com/* | |
| // @run-at document-idle | |
| // @namespace prof9.twittercramming | |
| // ==/UserScript== |
OlderNewer