06/22/19

Why is a regular language called 'regular'?

I have just completed the first chapter of the [*Introduction to the Theory of Computation*](http://www-math.mit.edu/~sipser/book.html) by *Michael Sipser* which explains the basics of finite... more

Safe integer parsing in Ruby?

I have a string, say `'123'`, and I want to convert it to `123`.I know you can simply do `some_string.to_i`, but that converts `'lolipops'` to `0`, which is not the effect I have in mind. I want it... more

06/12/19

Map and Remove nil values in Ruby?

I have a map which either changes a value or sets it to nil. I then want to remove the nil entries from the list. The list doesn't need to be kept.This is what I currently have:<!-- language:... more
C++

06/02/19

How would I get access of a variable in a namespace in c++?

For example: namespace space1{ int var; namespace space2{ int var; namespace space3{ int var; } } How would I access the variable from space1... more

05/22/19

In Ruby, how do I skip a loop in a .each loop, similar to 'continue'?

In Ruby, how do I skip a loop in a `.each` loop, similar to `continue` in other languages?

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.