[Solved] I have a list, how can I split words in list to get each letter from list [closed]

You can try to use the two for approach z = [“for”, “core”, “end”] letters = [] for word in z: for element in word: letters.append(element) print(letters) #[‘f’, ‘o’, ‘r’, ‘c’, ‘o’, ‘r’, ‘e’, ‘e’, ‘n’, ‘d’] 0 solved I have a list, how can I split words in list to get each letter from … Read more

[Solved] C# string compression

Ok i got it correct. Had to implement int helper = i; due to i being lost in 2nd for loop, in else statement. Answer: static string Compression(string test) { string result = string.Empty; for (int i = 0; i < test.Length; i++) { int helper = i; int counter = 1; for (int j … Read more

[Solved] Create the type of Box

I think this may help you. #[derive(Debug)] enum Fruit { Apple(String), Banana(String), } #[derive(Debug)] struct Test { A: Box<Fruit>, } fn main() { let test = Test { A: Box::new(Fruit::Apple(“apple”.to_string())), }; println!(“{:?}”, test) } 1 solved Create the type of Box

[Solved] How can I add hypen? [closed]

Is this what you needed? class Phone(): def __init__(self, name, area_code, number, is_active=True): self.name = name self.area_code = area_code self.number = number self.is_active = is_active def __str__(self): return str(self.area_code) + “-” + str(self.number)[:3]+ ‘-‘+ str(self.number)[3:] + ‘ ‘ + “(” + self.name + “)” def __repr__(self): return self.name + ‘,’+ str(self.area_code) + ‘,’ + str(self.number) … Read more

[Solved] Python. Copy Files and Folders to existing directory [closed]

You can use the copytree function from the shutil package https://docs.python.org/3/library/shutil.html#shutil.copytree. from shutil import copytree src_path = “path/of/your/source/dir” dest_path = “path/of/your/destination/dir” copytree(src_path, dest_path, dirs_exist_ok=True) The dirs_exist_ok=True parameter is useful if the dest_path already exists, and you want to overwrite the existing files. 1 solved Python. Copy Files and Folders to existing directory [closed]

[Solved] On click function JS make dynamic

Review Firstly, I’m assuming you’re new to JavaScript, if you’re not, then I don’t know what to say, but let’s just say you are. Firstly, that’s a horrible way to do things. Not only could other scripts assign events to the window click event, which may cause serious bugs with your code, but exposing things … Read more

[Solved] Don’t know how program a button to open file explorer that can open any document

Someone else was able to answer my question on another forum. Credit goes to Trebor76 from Ozgrid for the user friendly solution. This is the solution that was given to me. This was pretty plug and play. Option Explicit Sub Acessdocumentexplorer_Click() ‘The following has been adapted from here: ‘https://msdn.microsoft.com/en-us/vba/excel-vba/articles/application- filedialog-property-excel Dim lngCount As Long ‘Open … Read more

[Solved] Reversible Hash in C#

The most space efficient way to store binary data is to store it as bytes. The only way you may get it even shorter is via compression. But for 92 Characters that will not amount to much. As for Base64: There are cases where we are forced to transmit binary data over a medium not … Read more

[Solved] Need some help figuring out how to do 2 things in my C program [closed]

as far as i understand: #include <stdio.h> #include <string.h> void pause(void); void print_result(char **menu, int ret); void clrscr(void); #define MENU_INPUT(a) menu_input(a,sizeof(a)/sizeof(*a)) char * main_menu[]={ “Display First Menu”, “Display Sencond Menu” }; char * first_menu[]={ “Format Drive C:”, “Partition First Drive”, “Scan Drive” }; char * second_menu[]={ “Display an image”, “Play a sound” }; int menu_input(char … Read more