Learncado
Learncado

Learncado brings together a vast collection of questions and answers. Expand your knowledge, learn new skills, and find solutions to your queries effortlessly. Enhance your learning experience and save valuable time by exploring our website today.

Resources

  • Questions
  • Question By Tags

Help and support

  • Contact
  • About

  • Geniecourse
  • Jetsodeals
  • Rentcado
  • Dealcado
© 2021-2023 Learncado All Rights Reserved.

Search Results (539)

Results for How to implement a simulated annealing algorithm for optimization problems

December 11th, 2023
C++ parallel STL Vectorized algorithm not implemented p2408

I'm compiling the C++ code below with g++ 14.0.0: g++ -I/path/to/c++/14.0.0 -L/path/to/c++/libstdc++ -ltbb -std=c++23 -o main main.cc #include ...

gccc++c++23rangetbb
Read more
December 10th, 2023
Vectorize an algorithm with numpy

I have an two arrays of 1's and 0's: a = [1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0] b = [0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1] I want to make sure t...

pythonnumpypandas
Read more
December 9th, 2023
XOR operator problems in C

Which of the following options can achieve a swapping effect for pair (*, *)? Note that ^ represents XOR operation. For binary numbers, 0 XOR 0 = 0, ...

cxor
Read more
December 9th, 2023
Reproducible Elliptic Curve Digital Signature algorithm parameters in C#

Using the following code, I can generate the Elliptic Curve Digital Signature Algorithm (ECDSA) parameters (i.e., public and private keys). using var ...

c#.netecdsacryptographyelliptic-curve
Read more
December 7th, 2023
Why doesn't my recursive algorithm return "None"

I have the following for my first function (array defined under function): def test(array): if len(array) == 1: return 1 return test(a...

python-3.xrecursion
Read more
December 7th, 2023
Cannot implement search functionality in laravel

I have a web store application where from the home page you can click an input field, press find and it should show you the list of orders that are th...

laravelphpmyadmin
Read more
December 6th, 2023
igraph Leiden algorithm

I would like to know if there is a known problem with the Leiden algorithm implemented by igraph. When I run it, it generates partitions with too many...

rigraphleiden
Read more
December 9th, 2023
Redis cache optimization in .NET 8

The performance is not up to mark when serializing/deserializing a big JSON file (~3 MB). We are using Microsoft JSON serialization. Is there any othe...

.netperformancecachingredis
Read more
December 4th, 2023
Problems with telegram bot in Python & Aiograme

I have problems with telegram bot in Python. PIP = Aiogram. My code: import logging from aiogram import Bot, Dispatcher, types from aiogram.types impo...

pythontelegramtelegram-botaiogram
Read more
December 3rd, 2023
Why do I get this error when attempting to generics to implement a custom ArrayList?

I am attempting to implement an sub class that extends ArrayList. This class should print the elements of an array. import java.util.ArrayList; public...

javagenericsarraylist
Read more
December 2nd, 2023
Divide and Conquer max profit algorithm

I need to find a Divide and Conquer algorithm (for the max profit problem) with complexity Θ(nlogn) but I am only able to find with complexity Θ(n). T...

pythontime-complexityoptimizationcomplexity-theorydivide-and-conquer
Read more
December 2nd, 2023
How to write a general version gradient_descent algorithm in c++?

I want to write a general version of gradient descent algorithm in c++ to pass the following gtest. ... #include TEST(HW6Test, TEST1) { auto mi...

c++gradient-descent
Read more
December 2nd, 2023
Can I implement a generic From<> trait for a generic type for any other implementation than from itself?

I made a generic Vector struct, used with different T types : struct VectorT> { data: [T; 3], } I already implemented some generic traits for math...

rusttemplatestype-conversion
Read more
December 4th, 2023
Is there a compression algorithm for an array of unique keys that quickly lets me add a key, remove a key, or check for the existence of a key?

I'm thinking about developing a storage-efficient voting system. Users of my app should be able to upvote or downvote a post, undo their vote, vote ag...

algorithmhashcompression
Read more
December 1st, 2023
How to implement a Macro that can be in a comma operator

A Macro, say logging something I want it can be used independently with ";" followed LOG("hello world"); and it can appear in a “operator,()” int i = ...

c++macros
Read more
December 4th, 2023
How do I implement a timeout in python

First I send an order to a microcontroller to generate a signal, when I send an order I add the order to a map which contains tracked orders, this ord...

pythonasynchronoustime
Read more
November 28th, 2023
I'm having a hard time solving problems using try-catch syntax in Java

If the length of the string exceeds 20 because the string is inputted with str Generates RuntimeException with string "More than 20 words" If str is n...

javaruntimeexceptiontry-catch
Read more
November 28th, 2023
MultiObjective problems using gurobi solver - which method is used?

I'm coding a mathematical model in Julia, using the packages JuMP and Gurobi. So, first I create my model and set some parameters, as below: model = M...

optimizationjulia-jumpmathematical-optimizationgurobi
Read more
November 28th, 2023
Optimization Challenge- Merging arrays

I'd like to host a challenge, I've made a JavaScript function that is very unoptimized and can be improved in a million ways, Could you optimize it to...

javascript
Read more
November 28th, 2023
Optimization of Python Nested loops with Two Arrays

In an assessment, I got the following question: "There are two teams of size N, and the skill values of each player on the team are stored inside an a...

pythonarraysoptimizationnested-loops
Read more
November 29th, 2023
How can I see "problems" in VS Code code for all files- not just the ones opened

Pressing ctrl-shift-m in VS Code you can open the "problem" tabs, which display all the problems found for all the open files. is there some way (plu...

visual-studio-code
Read more
November 27th, 2023
algorithm for find lowest subsequence of items in 2 sets

N item are in a queue. There are two set with same capacity. Each item in this queue wants to enter the set that the item in front of him entered unle...

pythonalgorithm
Read more
December 2nd, 2023
Is possible to implement interaction to stack one object on top of another in AR?

I'm working on graduation researc and i was assigned to implement new function in AR mobile app, it works like furniture showroom/catalogue or somethi...

unity-game-enginearcoreaugmented-realityinteractionar-foundation
Read more
November 25th, 2023
Bellman Ford Algorithm not detecting negative weight cycles and won't work with alternate sources

I've been trying to implement a bellman ford algorithm in python but I'm having two issues: it won't detect negative weight cycles, nor will it proper...

pythonalgorithmbellman-ford
Read more
November 28th, 2023
Problems with Kerberos auth to Active Directory from Ubuntu 22.04

I get the error KDC_ERR_S_PRINCIPAL_UNKNOWN when I try to authenticate to an Active Directory realm from an Ubuntu 22.04 machine joined to the domain,...

networkingkerberos
Read more

Hot Topic

  • 25881

    How do I undo the most recent local commits in Git?

  • 11618

    How can I remove a specific item from an array in JavaScript?

  • 20343

    How do I delete a Git branch locally and remotely?

  • 7387

    How can I find all files containing a specific text (string) on Linux?

  • 7330

    How to find all files containing specific text (string) on Linux?

  • 7611

    How do I revert a Git repository to a previous commit?

  • 2671

    How do I create an HTML button that acts like a link?

  • 8481

    How do I check out a remote Git branch?