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
| import java.util.List; | |
| import java.util.ArrayList; | |
| public class Robot { | |
| public List<String> wordList = new ArrayList<String>(); | |
| String notUnderstand = "I do not understand the input"; | |
| String thanks = "Thank you for teaching me"; | |
| String iKnow = "I already know the word"; | |
| public Robot(){ |
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 findSum(){ | |
| sum = 0; | |
| for (i = 0; i < arguments.length; i++){ | |
| if (arguments[i] < 0) return -1; | |
| else sum += arguments[i] | |
| } | |
| return sum; | |
| } |
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
| <script type="text/javascript"> | |
| <!-- | |
| function toggle_visibility(id) { | |
| var e = document.getElementById(id); | |
| if(e.style.display == 'block') | |
| e.style.display = 'none'; | |
| else | |
| e.style.display = 'block'; | |
| } | |
| //--> |
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
| mount -o rw,remount /system | |
| mount -o ro,remount /system |
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 fs = require('fs'); | |
| var path = process.argv[2]; | |
| var fileExtension = process.argv[3]; | |
| var array = []; | |
| fs.readdir(path, function(err,data){ | |
| for (var i = 0; i < data.length; i++) { | |
| if(data[i].indexOf("."+fileExtension)!==-1){ | |
| array += data[i] + "\n"; |
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 fs = require('fs'); | |
| var path = process.argv[2]; | |
| fs.readFile(path,'utf8', function(err,data){ | |
| var spltArr = data.split('\n'); | |
| console.log(spltArr.length-1); | |
| }); | |
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 fs = require('fs') | |
| var str = fs.readFileSync(process.argv[2]).toString() | |
| var s = str.split('\n') | |
| console.log(s.length-1) |
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 sum = 0; | |
| for (cont = 2; cont < process.argv.length; cont++) { | |
| sum += +process.argv[cont]; | |
| }; | |
| console.log(sum); |
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 userChoice = prompt("Do you choose rock, paper or scissors?"); | |
| var computerChoice = Math.random(); | |
| if (computerChoice < 0.34) { | |
| computerChoice = "rock"; | |
| } else if(computerChoice <= 0.67) { | |
| computerChoice = "paper"; | |
| } else { | |
| computerChoice = "scissors"; | |
| } console.log("Computer: " + computerChoice); |
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
| conf t | |
| interface f0/0 | |
| no shut | |
| ip add 222.222.10.1 255.255.255.0 | |
| int f0/1 | |
| no shut | |
| ip add 222.222.20.1 255.255.255.0 |