[Solved] How I can Create many answer [closed]

I hope this answer is what you are looking for: You can make an array with your answers, and then check to see if the given answer is inside the array. const array = [‘test’, ‘test2’, ‘test3’]; if (array.includes(an.value.toLowerCase() ) ) … Something else, you are missing a semicolon in your else { … }. … Read more

[Solved] how can i fix System.IndexOutOfRangeException: ‘Index was outside the bounds of the array.’ in my undo and redo? [closed]

One simple solution would be to use a List instead of an array. List<string> temp = new List<string>(); It will need some tweaks but it will not limit you to 100 actions. In any other case, you should decide the strategy. Do you want to delete the initial items? Then remove your first X items … Read more

[Solved] python re.compile match dosn’t match backward slash in full path in windows [duplicate]

So there are two things: The assignment of s should be either with escaped back-slashes or as a raw string. I prefer the latter: s = r”C:\x\xxx\temp\downloads\test_dir\sql\my-ee.sql” you should use the search method instead of match to be content with a partial match. Then, you can use \\\\ in the regular expression, or – as … Read more

[Solved] How to select sub string in oracle?

Using substr: declare l_start number := DBMS_UTILITY.get_cpu_time; begin for i in ( with t as ( select ‘Chapter ‘ || level || ‘ Unit ‘ || level || ‘ Sect ‘ || level d from dual connect by rownum < 100000 ) select substr(d, 1, instr(d, ‘ ‘, 1, 2) – 1) chapter , substr(d, … Read more

[Solved] It only return one letter

You’re returning early in the loop, you need to build up a string and return that. Either just return a joint string or build it up “”.join(chr(ord(s)+4) for s in pas) def cip(pas): ret_val = “” for i in pas: asci = ord(i) encryption = asci + 4 ret_val += chr(encryption) return ret_val solved It … Read more

[Solved] HOW TO REMOVE DUPLICATES IN A ROW IN PYTHON [closed]

To learn more about text processing in Python3 I recommend training on codingame.com. def removeDuplicates(inp): output =”” lastCharacter=”” for character in inp: output+=character*(character!=lastCharacter) lastCharacter=character return output inpTest =”AAABBCCDDAA” print(removeDuplicates(inpTest)) ABCDA 0 solved HOW TO REMOVE DUPLICATES IN A ROW IN PYTHON [closed]

[Solved] C++ Word guessing game [closed]

crke[b] = ugib[b]; This line should be: crke[b] = ugib[z]; You might want to consider investing some time in learning how to use a debugger, which would’ve helped you figure it out. solved C++ Word guessing game [closed]

[Solved] trouble merging two json strings

Here’s how I would do it without the use of the deep extend module. First rearrange JSON1 so that the name property of each object becomes an object key: var obj1 = Object.keys(obj).reduce(function (p, c) { var o = obj[c], name = o.name; p[o.name] = JSON.parse(JSON.stringify(o)); return p; }, {}); OUTPUT { Car: {…} } … Read more