instruction
stringlengths
71
95.1k
I've been trying to kind of teach myself "Modern C++" the last couple of months and I just finished this interview type problem and thought it would be a good one to get some feedback on. I not including the full implementation for brevity, just the relevant parts for the problem. Random Node. Implement a binary tree ...
My own Givens-based QR decomposition function in R (pseudocode from Politecnico of Turin's math department) is the following: >Givens.fn<-function(V) { tol<-1.0*10^-14 m<-dim(V)[1] n<-dim(V)[2] spId<-bandSparse(m,m,0,list(rep(1, m+1))) # computed just once Q<-spId ...
#include <stdio.h> #include <cs50.h> int main(void){ long long card; int i; int otherdigs; int multiply; int sum = 0; int sumofothers = 0; int finaladd; int length; int card_length; long long get_card; get_card = ge...
I was doing Search in sorted array question from leetcode Question Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). You are given a target value to search. If found in the array return its index, otherwise return -1. You...
For context, I worked on the LeetCode May 2020 Challenge Week 3 Day 1. The challenge was described as this: Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Input: "tree" Output: "eert" Explanation: 'e' appears twice while 'r' and 't' both appear once. So 'e' must appear...
I am trying out websockets using the python async framework aiohttp. Basically I have created a game which will include multiple players and they will be able to chat using web sockets. There could be multiple game rooms and a player will be in a single room at a time. I believe I have the implementation right. Please ...
I am making a simple API for news items using Python and the Bottle framework. I return a Python dictionary from my endpoints as Bottle converts this to JSON automatically in the response to the client. I wanted to ensure a consistent structure to the responses, so I have declared a template dictionary. The code for ea...
Aim: To make pages located in site.com/page-1, site.com/page-2. Those pages are pretty much static so I won't use database. First, I've created the PageController. class PageController extends Controller { public function page($slug) { $page = $this->pageContents($slug); return view('page', ['page' => $page]); ...
This is a solution to this problem: https://www.codewars.com/kata/53005a7b26d12be55c000243/train/ruby The task is to make a simple interpreter that will take expressions and calculate the results. I'm just looking for general feedback on following Ruby standard practices and ways I could shorten the code by omitting pa...
A slick way to write the zip function in Scheme/Racket: (define (zip . lsts) (apply map list lsts)) (zip '(a b c) '(1 2 3)) '((a 1) (b 2) (c 3)) Is using cons instead of list in zip to get a list of dotted-pairs correct? (define (zip-dot . lsts) (apply map cons lsts)) (zip-dot '(1 2 3) '(a b c)) '((1 . a) (2 . b...
I'm working on a text adventure game for a while now, learning more about user input etc. I have a feeling there is something fundamentally wrong about my code, it seems too repetitive. The use of structs should make things less bulky but can't figure out how to use it properly. #include <stdio.h> #include <time.h> #in...
It has been a long time I used c++. So I brushing over concepts for interview preparation. Can you please help me with code review? If you have any observations/bugs/alternatives please point out. For better formatting, I have shared code here feel free to open issues. :) Thanks a ton in advance. #include <cstring> #in...
At first I wasn't really proud of this one, but then I decided that I need to know what's so bad about it? Why does it feel unsatisfying? How can I do it better? So yeah here's a unity project that does the following: Spawns a maximum of 3 wall bouncing corona balls where the player clicks, which when they collide with...
I have written Python code to rearrange some files in a directory, create new directories and delete old ones to form the dataset in the structure that I want it. Previously, I was doing this with repetative code because it got the job done but I want to clean it up and see no reason to repeat code. test_names_path = ...
I've a created a simple generic numeric input component with input mask which must only valid decimal numbers as input. Please check the code for any improvements. import React, { useState } from 'react'; import PatternConstants from '../Constants/PatternConstants.js'; const NumericInput = (props) => { const patte...
I decided to challenge myself to code this data structure by just seeing how it looks visually and this is what I got. I can change this easily to minheap by changing some greater than (>) operators. If there are ways to make this efficient/more compact, I'd love to hear it. class MaxHeap: def __init__(self, List=N...
I'm new to using type hinting in Python. I've used it for a small scraper I had to build (see code below), everything works fine and mypy gives no errors. However I'm sure there are better ways to write this (avoiding the repetition between the Ratings and ScrapedData tuples, better way to handle the Literal in functio...
I'm using this class as Modal in my CodeIgniter project, as I'm newbie in CI, I wanna know if this has some issues, I'm using this modal for all queries, like I call this with parameters and it returns results as I wanted. But I'm not sure if it a good idea or it might give some bad impact to structure and security. <?...
I am trying to solve this question: MaxCounters. Solving it is straightforward, but solving it fast enough is proving very difficult. How can I improve the performance of this code? At the moment it is too slow for the large_random_2 and extreme_large tests. function solution(N, A) { const M = A.length; let max...
I am writing a modified travelling salesman problem recursively in Python 3.7. It has to find the best path around breweries to find the most beer types and not to exceed the max_distance. The problem is the execution time. I left it to run for 10 hours and it still didn't calculate final answer. When max_distance is s...
I've made simple app that is able to take screenshot each -t seconds and OCR it to -o file. It's also able to take -path and OCR all images to -o file. It works pretty well thanks to tesseract ocr. Unfortunately my code seems much more complicated than it really is. Can you tell me what I'm doing wrong? I enjoy program...
I want to save NUnit local tests in a mysql database hosted in Amazon RDS, and I'm wrapping up everything in a transaction like so : using (var context = new StDbContext()) { context.Database.Log = Console.Write; if (!context.Database.Connection.State.HasFlag(ConnectionState.Open)) ...
This is a part of simple sfml C++ game, but I think neither the library nor the language is that much crucial here. I am mainly worried about the design. I have a class template ResourceHolder<Key, Resource> to hold one type of Resource such as texture or sound, inside a map. A key is usually an enum but can be anythin...
I'm pretty new to Rust and to it's async/await model, and I'm trying to do something that looks like a specialized Haskell's traverse function. Given a Vec<T> and a function T -> Future<Output = R> I want to get a Future<Output = Vec<R>>. At the moment, I have the following: use futures::{FutureExt, StreamExt}; pub as...
I have created the following few functions for handling the use of doubly linked lists. list.c: #include "list.h" #include <string.h> #include <stdlib.h> #include <stdbool.h> /* all functions returning a pointer return NULL on failure * all functions returning an integer return != 0 on failure */ //internal sta...
I will import given code for my main QMainWindow.(I only add import sys etc. to run it) Is there a more compact way to code this lines. Output is correct for my expectation. from PyQt5.QtWidgets import * import sys class ButtonWidget(QWidget): def __init__(self): super(ButtonWidget, self).__init__() ...
I am teaching myself some coding, and as my first "big" project I tried implementing a Steepest Descent algorithm to minimize the Rosenbrock function: $$f(x, y) = 100 (y - x^2)^2 + (1 - x)^2$$ The algorithm goes like this: We start with an initial guess \$x_0\$ (vector). We update the guess using the formula $$x_{k+1} ...
I was practicing C++ and data structures and wrote my own implementation of a doubly linked ring. I would love to improve my code a little bit more and would need help from the community. Here is the implementation I have: #ifndef BIRING_H_INCLUDED #define BIRING_H_INCLUDED #include<iostream> #include<string> using n...
So I implemented drivers for I2C and USART using interrupts with some guidelines online, and was wondering if I can get some suggestions from a design point of view even though the code works (tried at 9600 and 115200 baud rate), but I do get a hardfault upon using two different baud rates at RX/TX. One reason could be...
After some time poorly designing my web applications' backends (mixing database calls with the controller, etc.), I have decided to try the "Clean Architecture" approach. In this example I have a REST api users which allows you to get a list of all users in MongoDB and to put a user inside the database. Please, any sug...
My excel program import from another workbook, exported from SAP, some columns to update my dashboard. To do this I use ADODB, the code run right and fast (26K rows and 32 columns on 00:00:26:1226). But I see that some columns with data/time aren't correctly formatted, the poblem is that not all date columns just some,...
Would appreciate any input on these building blocks functions of tic tac toe. def display_field(cells): print('''\ --------- | {} {} {} | | {} {} {} | | {} {} {} | ---------\ '''.format(*cells)) def analyze_field(cells): """ Args: cells (str): a string of an XO pattern Returns: (str)...
The standard library heapq in python doesn't support updating keys as a public method, which makes it hard to be used as a priority queue. Although the official documentation has suggested a workaround, it is somewhat convoluted. So I decided to implement my own priority queue as a min-heap. Here is my code: class Heap...
I know there's already a whole bunch of similar attempts at this and I've looked at a few of them to get some tips. My main aim with this was not to write anything fancy. I wanted to create a simple game with the most basic functionality but write it really well. In other words I'm more interested in making my code pro...
Requirements I have a table of the different diagnoses a patient has received, with the date the diagnosis was first recorded. It so happens that in medicine, diagnoses are recorded as codes from a huge list called ICD10, and sometimes several different codes are related to a single disease, for example a patient will ...
I have 2 asynchronous return values from 2 different classes, one from HealthKit, the other from MotionManager. I combine the outcome of these classes through a combinedViewModel. The code works, but I want to know if it is properly formatted and if all functions, ... are used in the right place. With other words, can ...
I have just read the Chapter 5 of Data Structures and Algorithms with Python. The authors implemented hash sets using linear probing. However, linear probing may result in lots of clustering. So I decided to implement my hash table with a similar approach but using linear congruential probing instead. Below is my code:...
I wrote some code to estimate the solution to the following problem: If you break a line segment at two random points, what is the probability that the new line segments can form a triangle? The code is relatively simple, and it works. However, I can't shake the feeling that each of the three functions I've created c...
I made the bellow macro to create a time line in excel. It shows the working days, the week numbers and the month together with the year. First I start with projectstart date and projectend date. As these dates can be any working day and I want my timeline to start on a monday and end on a friday, I find the firstmonda...
I am writing some code that performs a simple time-history integration solver (Newmark method for structural dynamics) and I looking for some suggestions in how I can improve the performance of my code. Currently, I am calculating a parameter called displacements for many time steps (think on the order of 5,000,000 ste...
For learning purposes I'm writing a very simple mqueue based file transfer server. Below is a thread function that takes care of an incoming request: static void * handle_client_request(const char *request_string) { char request_pathname[_part_delim_alloc_size], request_fifo_name[_part_delim_alloc_size]; ...
Last night I had to build dropdown for the menu on the website that I'm working on. As I'm still React newbie I first looked if there is some package for what I'm trying to achieve but there wasn't, so I had to try to build it on my own. So the menu has its menu items, whichever is hovered it should show its content an...
I'm doing a little more grad school, and for a group project I wanted us to be able to quickly share and update our project, so I coded up a Python script to handle that. As usual, I'm proud of the work, but I'm here for you to tear it to shreds again. First, the imports, some globals, and the main: import time from su...
Please review my code for the performance and correctness, everything works and we get visible wifi access points by opening http://esp8266_ip_addres/hotspots except on refresh the values gets duplicated. and does not reset as I have done in the else block. #include <ESP8266WebServer.h> #define HTTP_REST_PORT 80 #de...
I'm currently implementing a Minesweeper clone in Java using Swing. Rather than updating the tiles like so @Override protected void paintComponent(Graphics g) { super.paintComponent(g); for (int row = 0; row < rows; row++ ) { for (int column = 0; column < columns; column++) ...
I've a scenario where 10K+ regular expressions are stored in a table along with various other columns and this needs to be joined against an incoming dataset. Initially I was using "spark sql rlike" method as below and it was able to hold the load until incoming record counts were less than 50K PS: The regular expressi...
Used classes to make this simple tic tac toe game. Any improvements? from itertools import chain class Field: def __init__(self, sequence): self.sequence = sequence self.rows = [[sequence[i] for i in range(j, j + 3)] for j in range(0, 9, 3)] self.columns = [[row[i] for row in self.rows] f...
Question:- Why is this code so ugly ?? This is my first code, it is working fine, but I feel it doesn't looks as standard code … I am still studying java through youtube, as I have just completed two topics language fundamentals and operators and assignments in java. I have tried to create code that calculates loan on ...
Here is an implementation of Conway's Game of Life. It is kind of a brute force but it works fine. I have a special question about the method cv::Mat render() const, which renders and returns a cv::Mat. Should I return a reference cv::Mat& render() const or allocate an object on the heap and return the pointer? I would...
So I've just finished my first Python module (and published on Github), with this little project I'd like to learn how to distribute my code so that other users can use it as a plug in for their own projects. Specifically I'm looking for feedback in the following direction: Is the interface to the module designed corr...
I am writing a program to combine the basic form of a word with suffix arrays following the choices from a form group (Angular 9) to receive the declination. This is the flow: The user inputs a word. The user chooses the predefined grammar categories of the word (genus, class, animacy and others). According to the cho...
I implemented the following react hook to get live updates of an element's position and dimensions in the DOM: /** * @author devskope */ import { useCallback, useRef, useState } from 'react'; import { throttle } from '../limiters'; const useElementDimensions = () => { const [dimensions, setDimensions] = useSta...
I am learning javascript and have developed a car game using: HTML Canvas javascript The repository link is: https://github.com/lazycoder-007/car_race_html_javascript_game The code is given below: This is the GameArea object, with functions related to load, start and stop the game. var myGameArea = { canvas : do...
Is the method used below to get data from a database efficient and optimal? The data is in a MySQL database, and in my server I have a PHP file with the following code to return some information: if($_POST["method"] == "requestBusinessFood") { requestBusinessFood(); } function requestBusinessFood() { $categor...
This is a Yahoo Finance wrapper to get income/balance statement for a stock ticker. What I have tried to do is make an abstract implementation so more features can be added easily in the future. The base-class YahooFin contains methods to get and beat the data into shape so it easily can be put into a pandas DataFrame....
Let's Fight: one Entity can perform an attack (thus making him an attacker) on another Entity (defender). This follows some Rules, described within the AttackProcedure.performAttack(). The FightRules describe, what Chances one Entity has to succeed (or not) and what Damage will results from an attack. (C) https://www....
I have written the following Javascript code which increments and decrements 3 separate inputs by 1: //INCREMENTS/DECREMENTS BEDROOMS BY 1 function plusOneBedrooms() { var addRoom = document.getElementById('rooms_amount_bedroom'); value = parseInt(addRoom.getAttribute('value'), 10) + 1; addRoom.setAttrib...
Wrote a python script to web scrape multiple newspapers and arrange them in their respective directories. I have completed the course Using Python to access web data on coursera and I tried to implement what I learned by a mini project. I am sure there would be multiple improvements to this script and I would like to l...
Inspired by MIT OCW (6.006)'s lecture on BSTs, I implemented them with the slight tweak where an element has to satisfy the "k-minute check" before insertion. If its value is within k of any other existing value in the node, the node should not be inserted. k is a positive integer parameter provided upon creation of t...
This is a fully functional code that i have just completed today. I just want to know how efficient is this. and how could i improve it or if theres any bugs that i have miss out. import os from AskUser import ask_user as As from random import randint #initialising the board class Board(): def __init__(self): ...
I've self-taught myself Python and have recently started learning tkinter. I made a simple stopwatch program and I wanted to know if the code is clean and written in a way that the code works efficiently. I would highly appreciate any suggestions on how to improve my code! Thank you! from tkinter import * import time ...
Beginner functional programmer... (but not beginner programmer) Currently, I have the following code: import Control.Monad (mapM_) main = gridMaker 3 gridMaker :: Int -> IO () {-Creates a nxn matrix filling the lower triangle with "O"'s and filling the rest with "X"s Example: O --- X --- X O --- O --- X O -...
The Requirements: List the expensable items sorted by date and location given two variables: 'categories' and 'expenses'. The Categories variable provides the following information in order: Category ID, Category Name, and whether the category is expensable (Y/N). The Expenses variable provides the following informati...
I was following a tutorial for a social network. I want to know how secure this code is because I plan on launching it to the public web. <?php error_reporting(E_ALL); ini_set('display_errors', 1); // declaring vars to prevent errors $fname = ""; //First name $lname = ""; //Last name $em = ""; //Email $em2 = ""; // ...
I am trying to implement topological sort. The idea is that I have a vector of pairs in which the first element is indegree and the second is a linked list. I tried a bunch of tests, they seem to work, but I am not really sure about my implementation. Is this really a topological sort? Can you please review my code and...
I have a following list which indicates the indexes. List<Integer> integerList = Arrays.asList(1, 3, 5, 6); // index I have the following collection of objects. Collection<Test> testCollection = new ArrayList<>(); Test test01 = new Test(0, "A"); // 0 Test test02 = new Test(1, "B"); // 1 Test test03 = new Test(2, "C"...
I have written the following code for my 1st year project, the Fibonacci series. I programmed it without searching Google. Is my code good enough to get me an A or a B? Can I make the code more professional? #include <stdio.h> #include <windows.h> #include <math.h> main(){ double x, y, xy; printf("Presenting t...
I was just wondering if there is a way to speed up the performances of this for loops in Python. I'm trying to process an image to get the color-moments without using libraries. It takes about 12sec to do the calculate_mean and calculate_standard_deviation functions for each part of the image. import math import cv2 ...
I'm trying to determine whether the prime factors of a given number are different to the primes that I have in a list. The number has to: be dividable with any of the primes in the list not have any other prime factors not in the list Example: Given my_primes = [2, 3, 5], then n = 14 should return [7] 14 has factor...
I have the following code which works. Been trying to write it in Java 8 streams to make it more readable but unable to get my head around it. Looking for any feedback to make it more readable. Thanks. // Expected output like: 1~CODE1|2~CODE2|3~CODE3|4~EX|5~CODE5 private String getFormattedValue(List<Content> list) { ...
I'm trying to get my basic coding principles right but there's still a long way to go. This is an exercise for CodeGym. They logic itself isn't very hard and I passed the exercise easily but I'd like my code reviewed with the following in mind: In terms of the general architecture, I wasn't quite sure if I needed two ...
I decided to make my own data structure. I did this because I wanted a data structure that is a queue but has o(1) time on lookup. template <class Object> class ObjectQueue; template <class Object> class ObjectQueueNode: private NonCopyable { friend class ObjectQueue<Object>; public: ObjectQueueNode(const...
After following up this question, I'm thinking if there's a better/shorter way to write this text element that has part with different style, while allowing localizations: <p> <span class="has-text-grey">{{ $store.releaseList != null ? $store.releaseList.length : 0 }}</span> <span> versions released</span> </p>...
I have created a database using Django. I have a small statistics page as shown below. Can I improve this code? View file def statistics(request): """ Return the number of categories (Category is based on first three-letter character, say Cry in the example) in the database and its correspondi...
Following This post : https://stackoverflow.com/questions/630803/associating-enums-with-strings-in-c-sharp/56482413?noredirect=1#comment107635743_56482413 I wanted to go further as it didn't quite fully met my needs for a Enum like Class that would act as string I ended-up with a solution that allows me to do the foll...
I am conversant with Kadane's Algorithm. This is just an exercise in understanding divide and conquer as a technique. Find the maximum sum over all subarrays of a given array of positive/negative integers. Here is what I have worked on but accumulating sum in solve_partition() looks pretty similar to solve_crossing_p...
I have this little server at home, which is hosting some websites, school stuff and a minecraft server. I made this backup script and I would like some feedback since I'm not very good at scripting. #!/bin/bash # declare folders to backup dirs=( "/home/ferre/Minecraft" "/var/lib/automysqlbackup/daily" ); # bac...
I am looking for feedback on screen reader improvements for the code/example below. The Select2 pillbox control needs to be more accessible. They have an open issues on this subject Select2 Issue Page and after I get more feedback will submit change suggestions to them (or submit a branch with the changes). My Goals i...
Hey guys I am trying to improve my Python Programming skills, I tried to build a hangman code. I know it is not perfect but I works. I am looking for some hints or advice to improve this script. txt_file = open('dictionnary.txt','r') # Open the file with read option words = txt_file.readlines() # Read all the ...
I'm learning rust by creating a simple card game program, with the usual stuff, ranks, suits etc. Currently I only implemented the card generation and a simple render function (not for future use). Looking at it, I can abstract some things, in terms of modules: I have a deck generator, it can be for a poker deck with ...
I have tried implementing an AVL Tree on my own, based on visualising it. But i'm unsure how many testcases it work with, and how efficient it is. Are there any ways to make it efficient, and compact? class Node: def __init__(self, value, parent=None): """ Every Node has a value, and a height based ...
import requests import json import time f = open('ok.txt', 'r') c = f.read() r = [] start = time.perf_counter() def steamCheck(name): return requests.get("https://api.steampowered.com/ISteamUser/ResolveVanityURL/v0001/?key=removed&vanityurl=%s" % (name)).json() for word in c.split(): p = steamCheck(word) ...
Scraping news articles from various web page is the main goal of this code. For starting all spiders(web crawlers) at the same time, I try to implement the facade design pattern. It works but I feel the constructor of SpiderFacade class can be improved. Is there better way to do it or better design pattern to do it ? A...
https://try.gitea.io/nadal/repository Used this in a coding challenge after a job interview. I didn't get chosen, but I was wondering if it was because of the code quality in the project. import React, { Component } from 'react'; import * as ExpenseActions from '../actions/ExpenseActions'; import { bindActionCreators }...
I tried to implement union find (disjoint set data structure) algorithm in C++. There I used unordered_map data structure. Is there a better way of doing this using any other data structure. While finding the root I have used the following way. int root(int i){ if(i != parent[i]) parent[i] = root(parent[i]); ...
I'm making a Minecraft clone and have made an Object Pool. Looking for some advice on how I have implemented it. Uses m_availableObjects as a O(1) way of searching for the next available object. Thank you in advance. constexpr int INVALID_OBJECT_ID = -1; //Internal Use - Object Pool template <class Object> struct O...
It's a pretty simple script really, i just want to know if there is a way to improve it. #!/bin/env sh set -o nounset set -o errexit if [[ "$#" -ne 3 ]] && [[ "$#" -ne 2 ]]; then echo "Usage: ./project.sh [NAME] [GENERATOR] [MAKEFILES]" exit 1 fi mkdir $HOME/Dev/$1 mkdir $HOME/Dev/$1/src/ mkdir $HOME/Dev/$1...
I implemented an open-addressed, double-hashed hashmap in C, now looking for some advice on improving it. Thank you. hashmap.h: #pragma once #include <stdbool.h> typedef struct hm_hashmap_t *hm_hashmap_t; hm_hashmap_t hm_init(void); void hm_destroy(hm_hashmap_t hm); void hm_set(hm_hashmap_t hm, const char *key, voi...
I have implemented a binary search tree with 2 operations to begin with. I have tried to implement it using the best practices I could think of. Overall, I am happy with the implementation. But, I want someone else's opinion about what they think about the design or any bad practice I have used. I wanted to get rid of...
There is few points In the script I don't like I think it can be improved, but I need a second opinion, here is the interactive plot I'm trying to build. here is the code with thought in comments. #!/usr/bin/python3 from functools import lru_cache import numpy as np import scipy.stats as ss import matplotlib.pyplot ...
I'm writing code for some accordions at the moment, using some simple vanilla JS (strictly not jQuery, has to be vanilla) and it feels like my code is really inefficient. Here it is at the moment: // Variables let down = document.getElementById("chevron-down-1"); let down2 = document.getElementById("chev...
This is my first project using Python OOP. I don't know whether the code I have written is correctly or not. How can I make this code feasible? Machine.py Class containing some default values class Machine: dict_coffee = { 'Cappuccino' : 100, 'Cafe Latte' : 200, 'Espresso...
I need help fixing my gameloop. Sometimes the game feels very laggy and I think the reason is that the tick() method is called slower then the render() method. What I want is that update is called as often as possible and the tick method gets executed with some kind of value that determines how fast thinks are going. F...
I am new to rust and this is a program that finds out the palindromes between a range. All tests have been passed but this program is really slow in finding the 4 digits Palindromes. This is an exercism exercise and Palindrome struct and struct methods new, value, and insert must be used in the final solution. I need y...
The following code represents the store method of a resource controller. A user can create an training offer on my website and can pass various information like website, trainers, date, title, address, videos and also upload a coverImage and multiple images for a gallery. The following steps are conducted: Validate t...
I develop an in-house Java framework. I provide an interface so that my end users can provide their own custom implementation (i.e. plugin/SPI). public interface SomePlugin { SomeResponse doSomething(SomeRequest request); } There are a number of small configurations to be made, some required and some optional. For...
I have tried the code for finding the class of the IP address the user inputs, and printing the network and the host bits in the IP address. Could someone please review this approach and provide suggestions. Thanks:). #include<stdio.h> #include<stdlib.h> #include<string.h> #include<sys/socket.h> #include<netinet/in.h>...
Background A few months ago, I asked this and this question on my implementation of a Sudoku-Solver. I now tried to further improve this little project. Changes Minor GUI-changes Input validation "Reset"-button Check if solution is unique (This question on stackoverflow helped) Naming Structuring Code with Classes Add...
I have the default code snippet that comes with the nvidia nsight eclipse V10.2, but I've modified it to do some profiling: /* ============================================================================ Name : Project1.cu Author : [] Version : Copyright : If you find this, by pure chance, feel f...
What my code try to do here is to sort items trough 2 dictionaries. If they are similar or the same, I create a new list to append them. The test file is relatively big, around 2000 data each dictionary. My concern is that i need to maintain a linear time complexity trough out the code and i am not sure that my code is...