Resultado da Busca
30 de abr. de 2017 · I'm writing an application called "Learn Morse" in Java using Maven. A Morse code translator is a part of this app. I created encode and decode methods to translate in both sides Morse code and I m...
16 de abr. de 2021 · 10. As already mentioned in the comments, I don't think there's a strictly better way to create the morse code mapping. There is however a lot we can do to make this code more concise and more pythonic. This looks like Java code that was directly translated into Python and doesn't utilise some of Python's key features.
10 de mar. de 2016 · When you are converting each word, you iterate through each character and you convert it to the morse equivalent and then append it to your "morse" string. A stringbuilder would also work instead of morseCode += "something" When you do morseCode += GetMorseForChar(character) you can use GetMorseForChar() or _morseAlphabetDictionary[character].
9 de jul. de 2024 · This happens because the constants of an enum have (correction:) some implementation-defined integral type, which might be unsigned or signed, and there is no standard way to retrieve it.
3 de nov. de 2017 · I just wanted to mess with my friend a little and wanted to text him in Brainfuck. Being a coder like me, I decided, why not just write a quick script to translate it for me? Considering that most
4 de ago. de 2021 · This returns an array of possible scores, from lowest to highest (the highest score is repeated because this function just returns an array… you should really use a proper type for this). Now the game is basically this: auto deck = deck_t::full_deck(); // sets up your full deck of 52 cards. deck.shuffle();
14 de ago. de 2017 · distriminated unions are basically, in terms of OOP, some abstract base class and a bunch of one level subtypes. That is exactly what I did in Railway.NET, however, we would have to wait for pattern matching based on 'structure' of the subtype untill C# 8+, at least to my knowlegde, there are no plan for this in C# 7.
14 de set. de 2023 · I just learned Python and Tkinter and I've just made a simple calculator using Tkinter for a small project at my school. It can do addition, subtraction, multiplication and division. I think that m...
31 de ago. de 2021 · 5. A DNI (Spain's National Identification Document) is formed by 8 digits and a letter, and they are related to one another as follows: number % 23 -> letter_index. Where the sequence of letters to be indexed is TRWAGMYFPDXBNJZSQVHLCKET.
3 de mai. de 2018 · Tetris game. I am working towards making a Tetris game where you can challenge an AI. Multiple parts have been finished, but a lot is still under construction. However I would like an intermediate review. The code I will post is a fully working 1 player Tetris game made with python3.6 & tkinter. If you are interested, Check the full github online.