instruction stringlengths 71 95.1k |
|---|
When coding in C# I often miss some functions from the F# world.
One of them is Seq.initInfinite, others are its counterparts with the AsyncSeq library:
AsyncSeq.initInfiniteAsync
AsyncSeq.initInfinite
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Threading.T... |
I wrote a program that saves the data from the first table of this Wikipedia article (in German) and then saves the column "Gesamt" (contains daily update of absolute numbers of COVID-19 infected people in Germany) together with the date in a CSV file. After that it draws a chart with logarithmical axis.
For the parsin... |
I have (designed and) implemented this fancy sorting algorithm that combines natural runs in the input array with a heap data structure:
function ArrayRangeException(message) {
this.message = message;
this.getMessage = function() { return this.message; }
}
function RangeCheck(arrayLength, fromIndex, toIndex) {... |
I have the following:
A set of K time-series in a numpy array with dimensions T x K.
A set of P permuted approximation of them in a numpy array with dimensions P times T.
I need a dictionary that tells me which is the most probable permutation. For that I've created the following function, but I would like to know... |
Here's my code for this' weeks homework I had. The code should take an expression , preferably in prefix notation ( otherwise throws exception ), that evaluate prefix expression. I've given three example in the main function. The expression gets saved in the object at the mText variable type of string and then the func... |
Legend says phones used to have keyscitation needed and in those times, a person could "encode" a phone number by creating a word from the letters in the keys with the given numbers.
Below is the usual layout of the keys (that matter for my question) of a phone:
| abc | def |
1 | 2 | 3 |
------------------
... |
Below is my permutation function and I'm looking to make it more elegant and efficient if possible.
The function should return a string which includes all the permutations of the given string (separated by comma).
private static String permutation(String prefix, String str) {
int n = str.length();
String toRetu... |
This is my first proper Go program, after completing Go by Example and https://tour.golang.org. I have a background in Python.
This program scrapes definitions from Wordnik, then prints them nicely in the commandline. It's made for looking up a word quickly in the commandline.
I'm hoping that someone can review this co... |
I'm creating a trip calculator that has some basic arithmetic and I'm just not grasping how to handle calculations. I feel like I'm doing a bunch of stuff wrong here. What initial values should I have in state? Am I putting too much in state? Is state saving these as numbers or strings? I included some commented out co... |
The game Space Station 13 (on the Paradise Station codebase) contains a DNA mechanic. Every carbon-based lifeform with DNA has 55 "blocks" that can be altered in a DNA Modifier, giving the mob disabilities or superpowers once they reach a certain threshold.
DNA blocks are 3-digit base-16 numbers from 000 to FFF. The a... |
I am not sure whether this is the right place to ask this, so please correct me if it's not.
I am following this paper (e.g., Corollary 3.3) for some derived functional representations of the densities and writing code for those. The code for one of the families:
(x will be a vector of 1xd between [0,1], tau - scalar i... |
Following great feedback given in response to my previous question, I was encouraged to consider a different type of heap structure, the Leftist Tree. It lends itself better to a functional implementation. It's already shorter, but is there anything else I should consider in order to make this more idiomatic APL? Many ... |
I've written an interactive function which lets me shudown, reboot my machine as well as put it to sleep.
I'm using emacs and I'm just starting out getting into ELISP programming. As I'm a total beginner, I'd like to know what you would do differently in the following code to make it better, lighter and so on. Many tha... |
First off, not the greatest with jQuery but know enough to get by. I created this mock up that is base on my application and wanted to see if there is a better way to update hidden values and a tags. When the form is saved I am using the sortorder to find the corresponding .ui-sortable li that has a tag and hidden fiel... |
Given an array of integer (all different from each other), this program creates a BST with the array elements in order to sort them and put them back into the array, using the BST properties.
#include<iostream>
using namespace std;
struct Node
{
int label;
Node* left;
Node* right;
~Node() {
dele... |
I'm a novice programmer. I started with Java years back and now mostly use VBA to automate tasks for my internships. I want to graduate from VBA and get into Python/R to properly automate tasks.
The below code is my first Python project. I would like any of you to point out how it can be improved.
The program is mean... |
I have made a flashcard program. It opens a small window and displays a series of questions.
Since I am new to programming, how can my code be improved?
from tkinter import *
# This opening code is to create a window and menu options. I'm going for a
# basic framework here in which everything else will fall under.
d... |
I've written a short web scraper in Lua (run in LuaJIT for speed) to download every post from a specific forum (not general purpose... yet). It takes about 12 hours to run and download 500,000 posts and there are no errors. I'm wondering how I can make it faster. I know different places where the code can be better in ... |
In my Player.java class, I want to incorporate a function that moves my player according to the left or right swipes. I also used time in seconds in order to vary the movement in an cyclic way:
'''
class MyGestureDetector extends SimpleOnGestureListener {
@Override
public boolean onFling(MotionEvent e1,... |
I wrote the following C++ code and since I am a novice in C++ and do not really have anybody who can give me advice, I think this site would be a good place to ask.
The algorithm takes the first two elements a1 and a2 of an array, calculate the difference a2 - a1. Then the first two elements a1 and a2 will be removed ... |
I have to find where a given string is in my multidimensional array.
So this is my array
$input = array(array('time' => '18:31:00', 'artist' => 'LUIS RODRIGUEZ & DEN HARROW'), array('time' => '18:32:00', 'artist' => 'J BALVIN'), array('time' => '18:33:00', 'artist' => 'THE BLACK EYED PEAS FT J BALVIN'), array('time' =>... |
I am creating a translation application and the users can add new translations to the "core" language, e.g. a Latin translation of the German word, and other users can vote on this translation. A translation can only be voted up or down once by the same user.
Here are my django models for these purposes, could you plea... |
I have a python code in Airflow Dag. This Dag performs 3 tasks:
Authenticate the user and get access token
Create a Databricks cluster using rest API and Submit a notebook job on a cluster using rest API. Pass access token created in the first step as input.
Check the status of notebook job
Please help me with code r... |
I made a simple django migration that adds two field to our Invoices model : first_payment and first_paying_month.
first_payment is obvious : is this the user's first payment, first_paying_month answers to the question: Was this payment made in the same month as the first payment, I'd love a more obvious name for this ... |
I faced the following problem.
I have a Server object server which exposes TriggerStateChangeAsync() which return an Task<bool> this task finished with true as soon the request for the state changed is send off to the server and with false if the request could not be send to the server. The object also exposses the eve... |
I developed a card game engine for a german three player card game called Skat. The operating code lives in a StateT SkatEnv (WriterT [Trick] IO) Monad.
data SkatEnv = SkatEnv { piles :: Piles
, turnColour :: Maybe TurnColour
, skatGame :: Game
, play... |
I wrote some code to create marketshare reports. However, I'm sure it can be improved. The tasks performed are:
Open the global data file, refresh the data, import its content as a DF.
Create a backup copy of the old report file.
Read the list of Distribution companies who should receive the report with their data (pl... |
I created a Custom view to select a value. I use horizontal Recyclerview to select an integer value and 2 buttons that decrease or increase the values. Could you consider the code and tell how it can be improved?
SliderValueSelectorView
public class SliderValueSelectorView extends ConstraintLayout implements View.OnCli... |
This code solves the problem of how to share user inputs throughout a large application when using dependency injection. To achieve this, I'm using a static (through DI) store and injecting it at those places, where the inputs are needed. In an application without dependency injection, arguments would be passed via con... |
Yesterday I hacked up a simple component selection program. An example is shown at the bottom for the application, though this can be used generally for a lot of different simple circuits I come across.
It requires Python 3; I've only tested it on 3.8.
About the code:
It is self-contained
The only really notable viola... |
I am quite new to the MVC concept. I already know how to program object-orientated from other languages like C++ or Java. I have implemented a little login system for test purpose.
I am not sure if my implementation is the best way to follow MVC. Any feedback is welcome.
The class ControllerUser is instantiated in a fi... |
I'm currently trying to process a corpus of a million patent text files, which contain about 10k non-unique words on average. My current data pipeline works as follows:
Load the patent texts as strings from a local sqlite database table
Tokenize¹ each document and save the results in a new table
Create a dictionary co... |
I have written a SQL server stored procedure to generate "log" tables which store the old values of rows when a table is updated, and also record when rows are deleted ( and by who ). It's quite straight-forward, the log table has identical rows to the table being logged, plus a "Changed" column which records the date ... |
I'm a beginner and i just started with automate the boring stuff with python course and reached his first os lesson, so i decided to make a recursive directory size finder since apparently os.path.getsize doesn't get the size of folders.
Need a way to improve my code or advice on coding tricks, to make it more efficien... |
Project Overview:
See how many times numbers would repeat x times on a digital clock output. This particular code only counts from 12:00 to 11:59, so it's technically only half of a day, I could take the (output x 2) for a full day.
Functions:
input_io():
Input the number of times you would like to see if a number repe... |
I have 2 variations of components that I wanted to create in React. They both use Radio buttons with the only difference is one adds an image to one side of it.
The first method will use just one component but use conditional logic to display the appropriate HTML:
getImgDiv(iconFile) {
return (<div><img s... |
I have a typeahead widget to get the state or city's population according to what the user types
Instead of issuing a GET request every time the user is done typing, the way this typeahead widget works is fetch data beforehand and store it in memory and every time user types, we are iterating through the data to retrie... |
I built some code to update dates from a Dump file.
I am commonly running into an "Exceeded maximum execution time" message. Otherwise the code works fine. It imports & updates statuses for 16.5 thousand rows from a sheet that has 29 thousand rows.
Can I make the code faster?
function update_main_master() {
var xngSs... |
Design
A template class that will create a concrete instance of an interface class when given the name (as a string) of the concrete class.
This design is often seen in code, so the purpose of this class is to reduce the boilerplate code needed to write a factory class.
The template class will be used like this:
using... |
I am implementing fundamental data structures in C# while trying to learn techniques in the language to make my code cleaner, more concise while using good programming practices.
I have implemented both algorithms, DFS and BFS, to find the bridges in a graph. The code is properly working (as far as I've tested).
Import... |
Firstly, take in account is my first question here in CodeReview. Any purpose misuderstanding will be highly appreciated if orientaded.
Scenario: I want to answer randomly a pojo (json with two fields) to Angular using a WebFlux restservice. I can succesfully answer an integer but I got stuck while trying retruning a ... |
Setup
The following code implements the algorithm described in this and this paper. The first paper describes how the evolution of a fish population can be simulated, while the second paper introdues the phenomenon of 'fishing' into the simulation. The end goal of both papers is to show that one can have a stable fish ... |
I'm trying to take advantage of NumPy broadcasting and backend array computations to significantly speed up this function. Unfortunately, it doesn't scale so well so I'm hoping to greatly improve the performance of this. Right now the code isn't properly utilizing broadcasting for the computations.
Is there a way wh... |
I quite like purrr::partial(), which allows us to easily create partial functions. However, the partial function loses its remaining arguments from its signature (replaced with ...):
f <- function(x, y) {
print(x)
print(y)
return(invisible())
}
ff <- purrr::partial(f, y = 1)
ff(2)
#> [1] 2
#> [1] 1
ff
#> <part... |
Description
I wanted to understand how integers can be written and stored inside variables without the use of Serial.parseInt(). I couldn't find any code examples about this. Perhaps this is the right way to do it, although it doesn't detect and block letters and special characters. Please leave some feedback on ways... |
A couple of days ago a user in chat asked us to spend more time in the queues. Kick starting my desire to get notifications for new items in the queues.
Reviewing the queues has been something I've wanted to do for a long time now. But I've never built a habit to check daily, and so I've wanted to use Simon Forsberg's ... |
I am writing a code that takes two numbers N and M and finds the greatest result of A mod M for all the numbers of A in the range 1,2,3,...,N-1,N.
1 ≤ N,M ≤ 10^9
My code is:
public static void main(String[] args) throws IOException {
long n=readLong(), m=readLong(), a=Integer.MIN_VALUE;
for(int i=1; i<=n; i++)... |
Python script that can downloads public and private profiles images and videos, like Gallery with photos or videos. It saves the data in the folder.
How it works:
Log in in instragram using selenium and navigate to the profile
Checking the availability of Instagram profile if it's private or existing
Creates a folder ... |
I've just finished one of my first projects with a GUI using PyQt5 and I recreated Mastermind, the board game.
The game is played by inputting 4 numbers and getting a return of how many of the numbers are in the code but in the wrong spot and how many numbers are correct (a random 4 digit combo between 0 and 9 inclusiv... |
I wondering if anyone could give me feedback on whether or not this is a secure way to implement AES/RSA hybrid encryption and signatures in python 3 with the PyCryptodome module.
All of the encoding and to/from hex format is just there because that's the format I intend to transfer it in.
"""Hybrid AES/RSA encryption,... |
Not really an issue I am stuck on (the code works) but I just really don't like some code I wrote, if you're bored in lockdown maybe you might like to help.
Context:
I am import some data from a spreadsheet, it contains data about retail stores (grocery stores). As the data comes in from the spreadsheet, each row is st... |
For my first solo React exercise project I decided to recreate a quote machine from the example that uses vanilla JS/jQuery. I also used a mix of Bootstrap/plain CSS. I got it to look how I wanted and do what I wanted, but I am not sure if my code follows best practices. All feedback is much appreciated, as I am still ... |
I have implemented binary exponentiation. Is this good?
def quad_pow(base, exponent, modul):
alpha = (bin(exponent).replace('0b', ''))[::-1]
a = 1
b = base
for i in range(0, len(alpha)):
if int(alpha[i]) == 1:
a = (a * b) % modul
b = (b*b) % modul
return a
|
I have programmed the extended euclidean algorithm. Is this a good approach?
def ext_ggT(a, b):
x,y, u,v = 0,1, 1,0
while a != 0:
q, r = b//a, b%a
m, n = x-u*q, y-v*q
b,a, x,y, u,v = a,r, u,v, m,n
gcd = b
return gcd, x, y
|
I am modelling a user preference system with the following requirements
a user can have attributes (foods they eat)
a user can have dynamic categories of preferences
users which have all their categories with at least one intersect can match
So far I have used Postgres's arrays to build a system to avoid joins. NB. ... |
I have implemented the Simpson's rule for numerical integration.
Check this video for the implemented function.
namespace Simpsons_method_of_integration
{
//https://www.youtube.com/watch?v=ns3k-Lz7qWU
using System;
public class Simpson
{
private double Function(double x)
{
... |
I am developing an application in which the user can use different measurement systems. Currently,
there is support for the metric and imperial measurement systems. To support these systems, I wrote a converter. Could you take a look at its code and tell how can it be improved.
public class SystemsMeasuresConverter {
... |
My controller is looking something like this.
Each of the methods called generate some HTML. The concatenated HTML variable gives the final render of the page
Is there a better way to generate my HTML to render coming from different functions:
$html = $renderer->render($clear_form);
$html .= $this->render_preview();... |
We have to reverse char[] using recursion.
Input: ["H","a","n","n","a","h"]
Output: ["h","a","n","n","a","H"]
package codeMonk;
public class RevereseString {
public char[] reverseStr(char[] reversedString, int startIndex , int lastIndex, int midIndex) {
// Base Condition
if(startIndex > midInd... |
attaching my try on implementing simple naive-bayes classifier for sentiment analysis as part of learning clojure and using functional programming on ML algorithms.
I tried to invest more time in code readability, functional-operations & mindset rather than efficiency (there are clearly parts in BoW creation which can ... |
In my application we have four inputs that are radio controls and the first radio control is checked by default. When the user selects another radio control and then saves the form I want to get the new value. I am using the find class but then I need to use checked[0]. Is there a better way to do this?
JS
$("#form").s... |
I am aiming to implement a calculator in an object-oriented way.
Here is the solution by using the strategy pattern.
Looking forward to some valuable comments.
package oopdesign.calculator;
public class AdditionStrategy implements CalculationStrategy {
@Override
public int calculate(int value1, int value2) {
... |
Problem: You are given a board containing lower-case letters and a word that you have to form. You can only take the letters from the front or the back, hence you have to rotate the board left or right. You have to use the greedy approach (choose which rotation lets you take the letter the fastest on each turn) and get... |
This is my first major web scraping program in python. My code works nonetheless, I'm just not sure if it's the best OOP design. My code is below:
from bs4 import BeautifulSoup
import requests
import argparse
import sys
class ComicScraper(): # Class ComicScraper for scraping comic books
def __init__(self, comic_... |
I've written a function that takes a sequence and check for every item in that sequence whether the current value a selection (obtained with a selection function) is different (or on the first iteration) from the previous computed value and if that's the case (we considered there is a change), then map the current item... |
The code reads in integer array from user input and builds a minimum heap via an iterative scheme.
Are there any edge cases in which this approach would fail?
For the following test case/command sequence:
1 4 3 10 12 6 -1
remove
remove
print
My output is 4 6 10 12 instead of 4 10 6 12, is this an invalid implementatio... |
I made a pagination algorithm but in my opinion it is too complicated and it is quite difficult to be understood. This algorithm should show 5 pages where in the middle is the current page. It should also show two pages before and two pages after the selected page (if these pages exist).
So, I just want to generate ... |
I've been using Python for around 3 months and decided to make a simple text adventure game for fun and to exercise a lot of ideas I've been learning about. I've just recently learned about classes and OOP, as well as modules so those are the two features I'm the least sure of. It's mostly a base and has two rooms set ... |
I was recently intrigued by the Hindley Milner algorithm (for type inference) and decided to implement it in python. After implementing it, I got the feeling that the implementation was incorrect. I also felt that it wasn't very pythonic, and was sort of inefficient. Here is my code (it isn't as long as it looks-- ther... |
I am hoping to make a quick decision tree using the if statement in excel vba. The point is to have a message with a prompt show up and then it will take the person through the prompts based on the answers. Can my current approach be improved upon in any way?
Sub Decision_tree()
a = MsgBox("Want To Play A Game?", ... |
Raw Data & Analysis Objective
There is a company called Nerdina Entertainment (Nerdina for short). It's been decided to optimize the operation costs of 4 departments (see below). These have 4 types of specialists on staff. Each of the 4 types is characterized by three base properties: pay rate per month, gallons of cof... |
https://leetcode.com/problems/increasing-order-search-tree/
Please review for performance
Given a binary search tree, rearrange the tree in in-order so that the
leftmost node in the tree is now the root of the tree, and every node
has no left child and only 1 right child.
Constraints:
The number of nodes in the... |
After poking around in some areas of python, I've decided to try Pygame. After about two hours of coding, this is what I came up with:
import pygame
import time
import random
pygame.init()
pygame.font.init()
WINDOW = pygame.display.set_mode((500, 500))
pygame.display.set_caption('snake')
FOOD_COORS = []
TICK = 15
... |
So the idea came from the fact that
connmanctl only completes filenames/directories when used non-interactively,
whereas when used interactively (executing connmanctl without arguments an interactive shell is started), it does support autocompletion, but when it comes to completing services (wifi networks, ethernet co... |
I manage the Python API for the Manganelo (and Mangakalot) sites and I am not fully convinced that the code structure I currently use is the best. (https://github.com/nixonjoshua98/manganelo)
The API has various objects (MangaInfo, SearchManga, DownloadChapter) and an example of the usage are as follows.
from manganelo... |
https://leetcode.com/problems/flood-fill/
An image is represented by a 2-D array of integers, each integer
representing the pixel value of the image (from 0 to 65535).
Given a coordinate (sr, sc) representing the starting pixel (row and
column) of the flood fill, and a pixel value newColor, "flood fill"
the imag... |
Write and test your own double abc (char * b) function in the program, taking in the form of a string the fractional binary number of the form "1101.101" and returning an equal decimal number (here 1 * 2 ^ 3 + 1 * 2 ^ 2 + 0 * 2 ^ 1 + 1 * 2 ^ 0 + 1 * 2 ^ -1 + 0 * 2 ^ -2 + 1 * 2 ^ -3 = 8 + 4 + 0 + 1 + 0.5 + 0 + 0.125 = 1... |
I took some time to try and solve a problem. I am building a basic Node + Express API. In the app I have created a models folder and will be adding new models as I continue development.
I attempted to write a small autoloader for a directory to automatically load and export my models. This code snippet should work for... |
I have the following snippet:
import datetime as dt
end_date = dt.datetime(2020,04,12,10,30,0,0)
current_date = dt.datetime(2020,04,10,0,0,0,0)
diff = end_date - current_date
days = diff.days + (1 if diff.seconds > 0 and diff.days > 0 else 0)
I need 0 when day is the same and 1 or more when day > 1.
Examples:
time di... |
I have written below code to create/get a dict with n number of key, value pairs. Main idea is to use the same instantiated class object across my code and play around with k/v pairs.
Current implementation:
class DataForm:
def __init__(self):
self.data_dict = dict()
def create_key_value_pair(self, ke... |
I want to define the XML schema for an XML representation of shopping
order data.
See following requirements
The XML representation of order should contain order id, description, request date,
and many line item
Each line item element should contain book, quantity, and price. Price (which is price
per book) should ... |
Im looking for some help on improving my code which visualizes path-finding algorithms. The code is working however I know it can be improved. Any suggestions would be appreciated.
Github code - https://github.com/James-Charles-Robinson/Path-Finding-Visualisation-with-Pygame
Code
import pygame
import random
# class fo... |
I'm currently trying to learn how to OOP in JavaScript by making use of ES6 classes. As an example I created this Slider using classes. I didn't find any class example where the DOM is highly involved
class Slider {
constructor(_options, _className) {
this.options = _options;
this.container = document.getEl... |
New to Python and recently turned in an assignment that, in the grading, was reviewed as 'very bad' and 'doesn't use sets' with no further elaboration. Wondering what I can do to improve this code.
The assignment instructions and restrictions were as follows:
Problem : Card Collections (cards.py):
In class we talked... |
I am student who is creating a big project trying to display data and information on maps using OpenLayers and React. At this point I have created a basic two page project where the map is the central piece of the application. For every page I have one main Component that contains its Sidebar, the Viewer Component that... |
Given a Tax type and city, access a REST API to get the total amount of taxes with the given type and at the given city. This information is to be grouped by users and ordered ascending by numerical id.
To access the log of taxes, I perform an HTTP GET request to https://api.doit.com/taxes/search?taxType={0}&page={1} w... |
I programmed the extended Euclidean algorithm together with the inverse modulo because I am making an RSA system from scratch. Any feedback regarding efficiency etc. is welcome :)
def ext_gcd(a, b):
a0, a1 = a, b
x0, x1 = 1, 0
y0, y1 = 0, 1
while a1 != 0:
q = a0//a1
... |
Given a binary tree, return the sum of values of its deepest leaves.
Constraints:
The number of nodes in the tree is between 1 and 10^4. The value of
nodes is between 1 and 100.
Please review for performance and style
using GraphsQuestions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace TreeQuest... |
I've spent the past few days writing a python based client that allows you to locally encrypt your message and send it through Gmail. The encryption scheme is based off of hybrid RSA/AES encryption, where the message body is encrypted with AES and the one time session key is RSA PKCS1 OEAP. It also provides valdation o... |
> Exercise 1: Design a database connection
To access a database, we need to open a connection to it first and close it once our job is done.
Connecting to a database depends on the type of the target database and the database
management system (DBMS). For example, connecting to a SQL Server database is different
... |
I'm using ImageProcessor in C# and I can't come up with a way to make a generic method out of its methods as to avoid writing the same code more than once.
Say, I have two methods, crop and resize.
public Image Resize(Image image, int width, int height)
{
// Create a Image to be returned after being scaled, call i... |
My question concerns problem (b). This is my attempt:
def shift_left(D,k)
for j = 0 to k:
x_current = D.delete_first() //this remove and return first item
D.insert_last(x_current)
return D
The answer key was given the following for the solution. I am just trying to figure out if my solut... |
I wanted to get some feedback concerning the program. It's console based and in C#. If I should try to add constraints like making sure only the 4 questions shown are able to be typed in and nothing else or uses a number system to retrieve and set answers and if to add a randomization. If I am to add randomization how ... |
I’m a complete beginner. I was practicing from coding bat and the question was to create a function that will round 3 integers to the nearest 10 and then find their summation. I thought of a way to do it and it’s given in the picture below. Please help.
def round10(num):
return # This will return the ... |
for i in range(1,int(input())+1):
print(((10**i -1)//9)*((10**i -1)//9))
print('lol just need to fill one more line to post the question IGNORE IT')
What is the meaning of '*' in between ((10**i -1)//9) and ((10**i -1)//9) in the above print statement?
|
I'm trying to keep my sanity while working with a legacy winforms application that uses an web api, both maintained by my team.
In the past we have multiple cases of methods using wrong api endpoints, or even having different names in both client and server implementation, so we came with the idea of having an interfac... |
What I want to Build
I need to store structured data in a file column format. i.e. Each row of data is split across multiple files, each file representing one specific data item.
Example:
class Team {
int id;
int size;
};
class Person {
std::string name;
int age;
double salary;... |
This is my implementation of a graph and Kruskal's algorithm in Python. I wanted to design the graph module myself and I would like some feedback on the design. I tried to follow SOLID throughout. I am not sure if the separate Vertex object is wise, but I feel it could be useful as I expand this module.
I had a copy o... |
I have learnt python 3 for about 1 month. After I learnt the basics of oop in python, I try to create a blackjack game based on tutorial's framework. I spent 1 weeks to complete it. I want to see whether some further improvements can be done on my code. Thank you!
My blackjack game steps:
dealer(one exposed card, one ... |
This has been racking my brain for hours now. I will try to explain as much as I can. I'm aware this code is horrendously ungraceful, but I'm new to Fortran and making things more efficient is not easy for me.
I am trying to simulate the celestial motion I've specified in the title. I am going to have (before moving to... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.