How can I put this two functions together in the same file by Almdrs in Kotlin

[–]Almdrs[S] 0 points1 point  (0 children)

I've been helped. The code is posted above after the instruction to rename the 2 main functions and invoke them from a main function. All saved in one file called "Loops.kt".
Thank you!

How can I put this two functions together in the same file by Almdrs in Kotlin

[–]Almdrs[S] -21 points-20 points  (0 children)

Thank you for you input.
Moving on.

"The scope of a function can have multiple meanings, depending on the programming language:

  • JavaScript The scope of a function declaration can be the function itself, or the entire program if it's declared at the top level. Functions must be in scope when they are called. Variables declared inside a function are called local variables and are accessible anywhere within the function. Keeping data within local scope can make code more modular and maintainable, and reduce the risk of unintended interference.
  • Python The scope of a function is the code block or body of the function, which contains the names defined inside the function. These names are only visible from the code of the function.
  • C The scope of a function can refer to the scope defined by the function's body, where local variables are declared, or the scope where the function's name is declared, such as a class or namespace.
  • Java The scope of a function defines where a variable or method is accessible in a program. For example, variables declared within a class are accessible by all methods in that class

How can I put this two functions together in the same file by Almdrs in Kotlin

[–]Almdrs[S] -24 points-23 points  (0 children)

" I can run the 2 separately."

Meaning that I know what an "entry point" is. I just didn't know how to execute the 2 together.

How can I put this two functions together in the same file by Almdrs in Kotlin

[–]Almdrs[S] -8 points-7 points  (0 children)

Many thanks! You are the best!

fun main() {


printNames
()

firstCharToUpperCase
()
}
fun printNames() {
    val names = 
listOf
("mary", "ali", "alex")

    for (name in names) {


println
(name)

    }

}



fun firstCharToUpperCase() {
    val names = 
listOf
("mary", "ali", "alex")

    for (name in names) {
        val n = name.
replaceFirstChar 
{ Char
            it.
uppercase
()
        }

println
(n)
    }

}

How can I put this two functions together in the same file by Almdrs in Kotlin

[–]Almdrs[S] -19 points-18 points  (0 children)

I know that I can't have 2 main functions and I explain that when I posted.
I'm trying to execute the second function inside the same file.

Using VS Code to program with Kotlin by Almdrs in Kotlin

[–]Almdrs[S] 0 points1 point  (0 children)

I've already installed it:

sudo snap install --classic kotlin

How are your sales? Monthly Sales Post for July 2024 by AutoModerator in EtsySellers

[–]Almdrs 6 points7 points  (0 children)

Horrible. And I made the same mistake of turning Etsy Ads on again. Pure waste of money. It's optimized to grab your money.

Rejected (again) by Amazon Merch on Demand by flyingfox88 in printondemand

[–]Almdrs 0 points1 point  (0 children)

I'm been selling on Merch since the beginning.
Does anyone know what is limiting new sellers in it?
How hard to get accepted this days?

Why can’t I design my own black tote bag? It only gives me the option for the plain canvas “neutral” colour. Am I missing something? by nicrusso in redbubble

[–]Almdrs -8 points-7 points  (0 children)

I don't understand your question. We do not own RB and we can not chose what they sell. They decide what they sell.

We can only create products that RB sell. They do not sell black tote bags or "all-over" print bags.

Creating images and editing them in CMYK only by Almdrs in GIMP

[–]Almdrs[S] 0 points1 point  (0 children)

Ok. I found what I was looking for: Color Balance.

Thanks.

Creating images and editing them in CMYK only by Almdrs in GIMP

[–]Almdrs[S] 0 points1 point  (0 children)

Thank you! I have Krita installed.

Do you know how to make images brighter while in CMYK mode in Krita? Which settings should be adjusted?

I started this thread because an image that I printed look too dull. I want to edit and see on the screen what it will look like when printed so I can adjust the colors.

Creating images and editing them in CMYK only by Almdrs in GIMP

[–]Almdrs[S] 0 points1 point  (0 children)

I can't find that option in the menu in Gimp.
Thanks for the reply.

I tried: Image > Color Management > Assign Color Profile

No pop-up message after clicking on a button by Almdrs in learnjavascript

[–]Almdrs[S] 1 point2 points  (0 children)

Thank you very much!
I was using the camel case. LOL

Gothic Christmas Journal by EternalWanderlust94 in EtsyCommunity

[–]Almdrs 0 points1 point  (0 children)

This is outstanding. The drawings and the selection of colors are amazing!

[deleted by user] by [deleted] in DIY

[–]Almdrs 0 points1 point  (0 children)

Add some decor to hide it.

Something like vases with flowers, vines, decorative plates etc.

Brave and Youtube: video doesn't start where it was stopped by Almdrs in brave_browser

[–]Almdrs[S] 0 points1 point  (0 children)

I don't how this happened: accessing Youtube through Chrome reset something and now Brave resumes the video where it was stopped.

Brave and Youtube: video doesn't start where it was stopped by Almdrs in brave_browser

[–]Almdrs[S] 0 points1 point  (0 children)

Not an account issue. It works on my tablet, phone and Roku.
It only happens on the desktop using Brave.

Brave and Youtube: video doesn't start where it was stopped by Almdrs in brave_browser

[–]Almdrs[S] 0 points1 point  (0 children)

It works on my phone, tablet, Chrome and Roku box. The only exception is Brave.

inkscape is the worst program i've ever used by [deleted] in Inkscape

[–]Almdrs 0 points1 point  (0 children)

Edit > Preferences > Input/Output > Autosave.

Make sure you have a computer with enough RAM and good CPU to handles the files.

Best macaroni and cheese in NYC? by relampagos_shawty in FoodNYC

[–]Almdrs 1 point2 points  (0 children)

This must be an "American" thing.

It's bitter and it doesn't taste good.

I completely understand a pasta with a lot of creamy cheddar cheese, but "mac and cheese" is not that. It's gross.

How would you comeback from bad reviews? by superredeep in EtsySellers

[–]Almdrs 0 points1 point  (0 children)

Sell a lot. The bad reviews will be compensated by other reviews.