Results for How to implement a simulated annealing algorithm for optimization problems
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 ...
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...
Which of the following options can achieve a swapping effect for pair (*, *)? Note that ^ represents XOR operation. For binary numbers, 0 XOR 0 = 0, ...
Using the following code, I can generate the Elliptic Curve Digital Signature Algorithm (ECDSA) parameters (i.e., public and private keys). using var ...
I have the following for my first function (array defined under function): def test(array): if len(array) == 1: return 1 return test(a...
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...
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...
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...
I have problems with telegram bot in Python. PIP = Aiogram. My code: import logging from aiogram import Bot, Dispatcher, types from aiogram.types impo...
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...
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...
I want to write a general version of gradient descent algorithm in c++ to pass the following gtest. ... #include TEST(HW6Test, TEST1) { auto mi...
I made a generic Vector struct, used with different T types : struct VectorT> { data: [T; 3], } I already implemented some generic traits for math...
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...
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 = ...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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,...
How do I undo the most recent local commits in Git?
How can I remove a specific item from an array in JavaScript?
How do I delete a Git branch locally and remotely?
How can I find all files containing a specific text (string) on Linux?
How to find all files containing specific text (string) on Linux?
How do I revert a Git repository to a previous commit?
How do I create an HTML button that acts like a link?
How do I check out a remote Git branch?