Practicing my coding so I created a whale speak translator.
"I cried in a room for 25 years and I didn’t get a single hug from either of you."
is
IEEIAOOOEEAAIEEAIEEUUOEEIEEOOUU
if you were wondering
seen from United States
seen from United States

seen from Singapore
seen from France
seen from Japan
seen from Netherlands
seen from United States

seen from United States

seen from Singapore

seen from China
seen from China
seen from Japan
seen from France

seen from Singapore

seen from Singapore

seen from Malaysia
seen from China
seen from Russia
seen from Malaysia

seen from United States
Practicing my coding so I created a whale speak translator.
"I cried in a room for 25 years and I didn’t get a single hug from either of you."
is
IEEIAOOOEEAAIEEAIEEUUOEEIEEOOUU
if you were wondering
Interview Practice Problem #1: Strings
Problem Description:Â
Given a string s, find and return the first instance of a non-repeating character in it. If there is no such character, return '_'.
Example:
For s = "abacabad", the output should be firstNotRepeatingCharacter(s) = 'c'. There are 2 non-repeating characters in the string: 'c' and 'd'. Return c since it appears in the string first.
Try solving the problem first before looking at my problem analysis & solution!
Sample Program for Declaration Reading
This a sample program to demonstrate the use of various declarations that are used. There are indeed many more that are used based on given situation, but these are references on how few of them are used. #include <stdio.h> #include <stdlib.h> int my_add(int a, int b) { return a + b; } int my_sub(int a, int b) { return a - b; } int my_mul(int a, int b) { return a * b; } int my_div(int a, int b)…
View On WordPress
Learn to code online using courses, practice lessons, community guidance and a lot of tinkering.
IF YOU THINK ABOUT HOW websites, mobile apps or any software programs are developed, coding is almost definitely involved. That’s why it can be valuable to learn how to code. Coding communicates instructions to computers through languages that they understand. There are many paths you can take to learn coding, depending in large part on your goals.
Coding Interview Question: Rotate Image
You are given an n x n 2D matrix representing an image.
Rotate the image by 90 degrees (clockwise).
Note: You have to rotate the image in-place, which means you have to modify the input 2D matrix directly. DO NOT allocate another 2D matrix and do the rotation.
Example 1:
Given input matrix = [ Â [1,2,3], Â [4,5,6], Â [7,8,9] ], rotate the input matrix in-place such that it becomes: [ Â [7,4,1], Â [8,5,2], Â [9,6,3] ]
Example 2:
Given input matrix = [ Â [ 5, 1, 9,11], Â [ 2, 4, 8,10], Â [13, 3, 6, 7], Â [15,14,12,16] ], rotate the input matrix in-place such that it becomes: [ Â [15,13, 2, 5], Â [14, 3, 4, 1], Â [12, 6, 8, 9], Â [16, 7,10,11] ]
--------------
Alright, y’all -- let me be real with you. I have been staring at this question for about an hour and a half, and I’ve got nothing. I took a look at a couple of solutions to understand the best approach to rotating the image in place, but they go over my head. Maybe my brain is just fried.
Start Coding Today - GeeksforGeeks Practice [BETA]
practice.geeksforgeeks.org
I was practicing coding in Scratch and I think I accidentally made the start of an EOS10 visual novel game??? I should stop.
Non-blocking I/O gaming magic
I've gone mad with power. Thanks to investigating every single comment and answer to this Stack Overflow post and combining key features of a couple answers, I have assembled a single Ruby method that handles nonblocking, carriage-return-free i/o beautifully for realtime little scripted games. BEHOLD:
require 'io/wait'
def char_if_pressed  begin   state = `stty -g` #turn raw input on   system `stty raw -echo -icanon isig`   c = nil if $stdin.ready?   c = $stdin.getc  end   c.chr if c  ensure   system `stty #{state}` # turn raw input off and                #restore state  end end
So glorious for this baby Rubyist here. Only problems: it still seems to be iffy on whether echo is actually suppressed. Oh well. Open to suggestions. Till then, Tetris is coming together even cooler than I thought.