1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
attashe74 [19]
3 years ago
15

Apakah ada yang bisa menjelaskan potongan source code ini?

Computers and Technology
1 answer:
GarryVolchara [31]3 years ago
6 0

This code attempts to fuse two strings together. So,

fuse("Apple", "Banana")

would return "ABpapnlaen a"

However, there are a couple of things wrong with this code:

- The for loop is incomplete (probably a copy paste error)

- It is unclear from the code if the array jawaban will overflow if kata1 and kata2 are large (it probably will)

- Biggest problem: the jawaban array is declared on the stack, which means it will be cleaned up when the function returns. So the caller of this function will reference unallocated memory! This is a huge bug!!

You might be interested in
In order to consolidate your theoretical knowledge into technique and skills with practical and applicational value, you will us
Arisa [49]

Answer:

Check the explanation

Explanation:

Lasso: R example

To run Lasso Regression you can re-use the glmnet() function, but with the alpha parameter set to 1.

# Perform 10-fold cross-validation to select lambda --------------------------- lambdas_to_try <- 10^seq(-3, 5, length.out = 100) # Setting alpha = 1 implements lasso regression lasso_cv <- cv.glmnet(X, y, alpha = 1, lambda = lambdas_to_try, standardize = TRUE, nfolds = 10) # Plot cross-validation results plot(lasso_cv)

Best cross-validated lambda lambda_cv <- lasso_cv$lambda.min # Fit final model, get its sum of squared residuals and multiple R-squared model_cv <- glmnet(X, y, alpha = 1, lambda = lambda_cv, standardize = TRUE) y_hat_cv <- predict(model_cv, X) ssr_cv <- t(y - y_hat_cv) %*% (y - y_hat_cv) rsq_lasso_cv <- cor(y, y_hat_cv)^2 # See how increasing lambda shrinks the coefficients -------------------------- # Each line shows coefficients for one variables, for different lambdas. # The higher the lambda, the more the coefficients are shrinked towards zero. res <- glmnet(X, y, alpha = 1, lambda = lambdas_to_try, standardize = FALSE) plot(res, xvar = "lambda") legend("bottomright", lwd = 1, col = 1:6, legend = colnames(X), cex = .7)

Kindly check the Image below.

5 0
2 years ago
Multiple Choice
zalisa [80]
Zeros and ones
Hope the helps
Godspeed
7 0
2 years ago
Describe the Pros and Cons Associated with Cloud Computing Cloud Computing was introduced in 1999 by a company named "Salesforce
Rudik [331]

Answer & Explanation:

Pros of cloud computing:

  • Cloud computing provides high speed due to faster deployment of services in fewer clicks.
  • It eliminates the need of IT infrastructure and manageability.
  • It is cost efficient as it provides huge space availability.
  • It makes it easy to get backup and recovery.
  • It is easy to access information anytime and anywhere in the world.
  • Due to cloud computing, it is very easy to add or remove services as required.

Cons of cloud computing:

  • It makes the data vulnerable and information theft challenges can be encountered.
  • Internet connection is required all the time.
  • There is less control available as it runs on remote servers.
  • Migrating information can become difficult.
  • It can face technical issues so the information will not be available for a limited time.
7 0
3 years ago
Which of the following is NOT a font style?<br> Italic<br> Bold<br> Regular<br> Iconic
madam [21]

Answer:

iconic

Explanation:

iconic iconic iconic

8 0
2 years ago
Read 2 more answers
Who watched Unus Annus??? (If you did what was your favorite part?​
quester [9]

This video was completeley unedited was a banger, and so was the vid where they made robot amy. that was hilarious.

But since it is now Post Mortem all say here is...

Unas Annus. Memento Mori.

It sure was fun.

3 0
2 years ago
Other questions:
  • 48. What is another word for processor?
    7·1 answer
  • Which is a real-world example of a procedure?
    11·1 answer
  • When creating a firewall exception, what is the difference between opening a port and allowing an application through?
    7·1 answer
  • Laser printers are particularly effective for printing _______________.
    6·1 answer
  • _______ data would be useful for creating a report containing last year's revenue, which won't be changing.      A. Integrated B
    12·1 answer
  • An item such as a smart card is an example of the _______ form of authentication.
    10·1 answer
  • _____ is a program that allows a person using one computer to access files and run programs on a second computer that is connect
    11·1 answer
  • Your search google for recipe for tonight dinner is an.example of ?​
    8·2 answers
  • If you are trying to improve your budget and spending, which option would save you the most money?
    13·2 answers
  • Ladders are a fundamental piece of equipment on construction sites and employers are expected to ensure that workers follow safe
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!