instruction stringlengths 71 95.1k |
|---|
I don't quite know where to post this but C# is not my first language and I am hoping to get someone to nod their head or correct me :)
This works but seems counter intuitive - mostly because I would like to make a list and then say list contains oneCharacter but, for cases like this, it would be excessively wordy.
... |
Create a Java class named HeadPhone to represent a headphone set. The class contains:
Three constants named LOW, MEDIUM and HIGH with values of 1, 2 and 3 to denote the headphone volume.
A private int data field named volume that specifies the volume of the headphone. The default volume is MEDIUM.
A private boolean da... |
I'm new to coding and this is a text based adventure game with combat. Sleep and choice functions based on idea from https://codereview.stackexchange.com/a/52292/179642. Map idea from Codecademy battleship tutorial.
The actions in the fight function are not in a loop because attacks reduce the opponent's hp but healing... |
This was a coding challenge I had done recently. I was given a text file and in it thee was couple of XML tags. The challenge was to get all the XML tags and the information and save it to another file.
The string I am given:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin nec arcu non nisl dapibus scel... |
I have written 2 Brainfuck interpreters, one in C++, then another in C++ with Assembly inner loop. My interpreter code can be found here (C++/ASM, requires MSVC and MASM) and here (C++).
Both are benchmarked using the mandelbrot BF program, run 20 times. After trying for a while, I managed to make the Asm version about... |
Among the many fractals, there is Collatz Fractal based on a complex extension of:
$$f(x) = \left\{
\begin{array}{ll}
\frac{x}{2} \space \text{if even} \\
3x + 1 \space \text{if odd}
\end{array}
\right.$$
To generate the fractal, you pick a bunch of points and repeatedly apply f over and over again a large number o... |
This is a fairly simple bit of code:
async function fetchData() {
console.log("fetching data");
let json;
try {
const data = await fetch(endPoint);
json = await data.json();
}
catch (error) {
console.error(error);
handleError(error);
}
try {
awai... |
I have the following code which I seek to optimize. The result of the bruteforce I already have but I'm just trying to learn some more python using the same example.
The code in the data needs to be split where the ++ are spaces and the || are just separators between letters. The // are carriage returns.
The code bel... |
I have a couple of chemical reactions. One of them is described as "If insulin is mixed with antibiotic, healthy people catch Fever". I think it would be useful for logging to keep these description strings inside the code. I have thought of 2 approaches but they both seem kind of wrong.
Approach 1
public abstract clas... |
This script attempts to crack passwords by going through all possible 'words', hashing them, and comparing the hash to the input.
It seems to work, but I don't know if I have written 'good' C. I'm looking for advice on what areas would be most important/beneficial to focus on (e.g. efficiency, design, readability, some... |
I have written a function func getScriptsFromUrl that accepts a URL and creates two files with script body and script src for internal and external JS scripts respectively.
But since I am totally new to Golang, I doubt if the code is of a high quality, so will highly appreciate if you
examined my code for compatibilit... |
This is my C implementation of the Minimax Algorithm to play tic-tac-toe. I consider myself a C beginner so any feedback on style, best practices, or efficiency is more than welcome.
# define HUMAN_PLAYER 'X'
# define AI_PLAYER 'O'
# define NONE '\0'
typedef struct Point {
int x, y;
} Point;
typedef struct Board {
... |
I implemented a centered finite difference approximation for edge enhancement in images. The difference approximation has a step size h of the partial derivatives in the x- and y-directions of a 2D-image. However, the function that calculates the difference approximation is slow on big images.
Here is the code:
import... |
I have a number x and I need to choose another number y from the given range [l, r] such that x XOR y is maximum.
This is what I did till now:
def maxXOR(x, l, r):
max_ = 0
for y in range(l, r+1):
temp = x^y
if temp>max_:
max_ = temp
return max_
But it is quite slow. How can I o... |
I wrote this code for finding the \$k\$th-to-last element in a singly linked list.
class Node:
def __init__(self, v = None, next = None):
self.v = v
self.next = next
a = Node("Australian Sheperd")
b = Node("Beagle")
c = Node("Cairne Terrier")
d = Node("Dobermann")
e = Node("English Mastiff")
a.next = b
b.ne... |
The following function uses a cartesian system and has an agent who moves on the table like: F - forward, L - turn left, R - turn right.
The code works fine but I would like to make it more efficient:
import java.util.Scanner;
public class HelloWorld {
public static void main (String[] args) {
int x = 0, y = 0... |
I've been spending some time learning Rust and I came across the Cryptopals Challenges.
This is my implementation of challenge 1
Convert hex to base64 The string:
49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d
Should produce:
SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG... |
Prompt:
Given a string containing digits from 2-9 inclusive, return all
possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the telephone buttons) is
given below. Note that 1 does not map to any letters.
I'm a relatively new LeetCoder and I feel pretty good ab... |
I am trying to implement the observer pattern for a stock exchange scenario. Multiple stocks can be registered at a stock exchange. There will be stock observers who are observing some specific stocks. Please advise how this implementation can be improved.
stock_exchange.hpp
#ifndef STOCK_EXCHANGE_HPP
#define STOCK_EXC... |
Recently I've built a service at my work to generate tokens with JWT (JSON Web Token) "protocol", I would like to show you the code and to get comments from you if that's good enough and if there are things to improve.
The service contains 2 folders and 4 classes.
Models Folder
IAuthContainerModel (Interface)
JWTCon... |
Problem
I use Emacs for Python development along with several linters. When I activate a Python virtual environment (venv) from within Emacs, I would like to set the linter binaries according to the following rules:
If the venv has a particular linter installed, use it
If the venv does not have a particular linter, us... |
I'm creating an application that reads in data from a CSV file and creates an XML file using LXML. The below code works as expected. However, before I develop it further I would like to refactor it and make it more DRY. I will need to start creating the additional XML snippets for the other code types in the CSV file a... |
Following idea:
You have a LCD-display with 2 rows.
You write the first line of a "text" to the second row. Then you clean the screen.
After a delay you write the first line to the first row and a the second line of the text to the second row. Then follows another clean
and delay.
Then you write the second line t... |
I wanted to implement my own runtime error class in C++, that could provide more meaningful information on where the error occurred than std::runtime_error does.
I decided to use boost::stacktrace to generate a stack trace, appended to the exception message.
Anyway, this is my code:
/**
\brief Represents a runtime ... |
I perform a mean blur on a number[][]-array (called grid in the code). I iterate the array, and calculate average values from adjacent "cells".
The kernel size defines how many adjacent values are used for average calculation.
/**
* Performs a mean blur with a given kernel size.
* @param {number[][]} grid - Data grid... |
some words in forehand: Unfortunately this post is very long, thus I decided to put the whole and compilable code into an online compiler. The link is at the end of this post.
In the last few days I have been working on my new graph searcher implementation. I tried to create a similar interface like the std::search fun... |
I'm trying to implement a batch API where requests are associated with an id. In the batch response, the individual success/failure responses should be associated to their corresponding request id.
The code looks like this
class Request {};
class Response {};
class BatchResponse {};
folly::SemiFuture<Response> handle(... |
This is the criteria:
Its length is at least 6. It contains at least one digit. It contains at least one lowercase English character. It contains at least one uppercase English character. It contains at least one special character. The special characters are: !@#$%^&*()-+
My code is working for all test cases but I'm a... |
Update: Have implemented some of the suggestions:
See GitHub: https://github.com/BostonBrooks/MathsGame/tree/master/Object_Pools_Demo
I am implementing a game engine where I have a sorted list of inanimate objects so that the closer objects get drawn over the further away objects, and I want to use an object pool rathe... |
I am requesting a JSON file that's gzipped. First, I download file:
import urllib.request
testfile = urllib.request.URLopener()
testfile.retrieve("https://xxxxx.auth0.com/1537150574", "file.gz")
After that, I will read the file.gz and get the data.
with gzip.GzipFile("file.gz", 'r') as fin:
json_bytes = fin.rea... |
My first ever attempt at Go. Writing a small app. It takes a property file and uses it to populate a Config object.
After adding the first property of the Config object (dateformat) I realised that the code was looking horrible and would only get worse as I added more properties.
Please help me simplify, how should t... |
I want to test some different endgame scenarios for one-handed Solitaire where the removal of the cards if the suit or value match is optional.
I've written a simple generator which yields at the decision point on every opportunity where it could clear cards and accepts a boolean on whether it will clear those cards.
A... |
I dont think this will work anywhere besides in minecraft with computercraft but it's all correct syntax. I just feel like it has some lines of code I could eliminated somehow and made it a cleaner script. I appreciate any constructive criticism to help me further understand what I'm misunderstanding.
function placef(... |
So I wanted to write a basic console based banking app to practice my skills. It makes use of BigDecimal to ensure accuracy. Here is the MVP I plan to enhance it with all banking features soon. I tried to follow the MVC idea as close as possible, I'm pretty happy with the outcome, although I was questioning myself abou... |
Please have a review of this Code chunk and let me know whether it is a good way for infinite Producer?
UniqueStrings = new BlockingCollection<string>(10);
Task.Run(() =>
{
while (true)
{
try
{
UniqueStrings.Add(GetNextUniqueStr... |
Scenario: I'm getting requests through a (thread-safe) queue. Each request then needs to be handled in a separate thread. There is a chance that the function (which is actually calling a Java-program via popen, and polling its output) takes a very long time. From the main thread I need a mechanism to indicate that sit... |
I'm wondering if some PS gurus can advise on whether my method for sorting and recombining some data fields by using an array of PSCustomObjects is as efficient as it might be.
I'm importing a CSV file that contains a number of person details, including Full Names in a single field that have a variety of separators bet... |
Intro
As some hobby thing, I'm trying to understand the basics of smart cards. How they work internally and what can be done with them.
Therefore I made my very first smart card program, which will fuzz a smart card for all valid possible instructions without trying to block up the card :)
I have had 0 experience befor... |
This is the second time I am asking for a review of this code (first time can be found here: Arabic language lesson program). The goal of the program hasn't changed - to house Arabic language lessons and teach Arabic to English speakers, somewhat similar to how Duolingo works. My programmng style to date is very "linea... |
I would like some advice on how I could shorten my function from my battleships game (below). Essentially what it does is it checks if a coordinate is a hit and if it is, then if checks adjacent coords and shoots the one that would be a hit (it cheats, basically, which is fine).
I would like to know what I could do to ... |
We define function D(x) as following:
D(x) = x + sum of digits of x
+ sum of prime factors of x then call x the father of D(x)
Write a program that gets input t at the first line and then gets an input in the next t lines. If that input had father, print YES otherwise NO
For example 12 is the father of 20
20 = 12... |
I am working on a small textract-based Python CLI tool that aims to extract text from either a single or multiple files, writing the output in corresponding text files. The input files can be of any of the formats that textract supports.
The full repository is here. (Forgive me for the lack of a README file for now, I ... |
Background: I'm designing a system Data entry form using c# as front end and sql server 2008 as backend database.
In this app I'm basically, just reading/writing to the database
My issue:
I never truly understood OOP, however I am getting more involved
with it now, and while my program works, I want the code to be
b... |
I need to open a file, read a line and if that line respect some conditions write it to another file, the line that I'm reading is a normal ASCII string representig HEX values and I need to paste it into a new file as HEX values and not as ASCII string.
What I have is this:
private void Button_Click(object sender, Rout... |
I have some data, which I've faked using:
def fake_disrete_data():
in_li = []
sample_points = 24 * 4
for day, bias in zip((11, 12, 13), (.5, .7, 1.)):
day_time = datetime(2016, 6, day, 0, 0, 0)
for x in range(int(sample_points)):
in_li.append((day_time + timedelta(minutes=15*x)... |
I'm writing an independent code which I'll import into an exe, Here is an self-contained example:
This code is a PCSTATE handler - basically when lara starts walking - this code will be executed. It checks for button presses and specific states (i.e. when an enemy is nearby and the action button is pressed - l(char, 0x... |
hoping to be schooled a little bit here in showing "no results".
This is a working snippet, but I'd like to know if there is a more elegant way to show errors when comparing multiple values in an IF statement within a ForLoop... I could have 10 results with only 2 matching my if statement:
if($value["IsArchived"] == fa... |
Can you guys tell me if my login is secure?
Login.php
<?php include 'session.php';?>
<?php
if(isset($_POST['username'])){
include 'dbh.inc.php';
$uname=$_POST['username'];
$password=$_POST['password'];
$secretcode=$_POST['secretcode'];
if (empty($uname) || empty($password) || empty($secretcode)) {
header("Locatio... |
The Following function is supposed to calculate the maximum depth or height of a Binary tree
the number of nodes along the longest path from the root node down to the farthest leaf node.
please comment as if it was a 15 minute coding interview. coding style and efficiency.
this was given to you
public class Bi... |
Intro: Before showing the actual code for review, let me show you an ExampleClass to create a shim for.
using System.Windows;
public class ExampleClass
{
public void ExampleMethod(string line) { MessageBox.Show(line); }
}
The target API of ExampleClass had been .net framework, before some new requirements came to... |
I made a queue that prints out strings a, b, c, and d. It works, but I want to make sure I don't have any unnecessary code. I realized that my main method prints the strings without the queue. Is there any better way to write the main method and Imp method so that it uses my queue class?
public class Main
{
//t... |
Currently, I have this and it's working for all cases:
import math
import os
import random
import re
import sys
def caesarCipher(s, k):
st = []
for i in range(0,len(s)):
if 65<=ord(s[i])<=90:
temp = ord(s[i])+k%26
if (temp>90):
temp-=26
st.append(chr... |
The insert query below must insert the items not present in the Articolo table by importing them from Importazione, and must update the items in the Articolo with those present in the Importazione. To summarize in Articolo the articles must be updated and the new ones included. The fact is that the two queries used by ... |
I have three functions that follow up the same pattern, can anyone give me an idea on how to make this code DRY? The child element with the css styles applied is not a child element, it is found way down the markup.
$("#pills-ficha-tab").on("click", function(e){
if( $(this).hasClass("active") ){
$(this).re... |
I have been getting back into C++ today, after a few years of Python and R. I am completely rusty, but decided to create a matrix object to re-familiarise. In reality I wouldn't use this class, since I know Boost has matrix objects, but it's good practice!
It can be compiled with g++ -std=c++11 matrix.cpp -o m.
Any t... |
I'm pretty new to python and have created a simple hangman. Since doing so I realise this appears to be a fairy common theme.
It uses /usr/share/dict/words on the local system, resulting in some tricky words to guess. I guess I should look at maybe curl'ing a URL to get random words or an API. I've also not defined a m... |
I am working on an app in which I have to pass 6 digits OTP through 6 textFields in which you to provide only one character and after that it automatically goes to another textField. I created 6 textFields outlets and used this code.
override func viewDidLoad() {
super.viewDidLoad()
txtOTP1.delegate = self
txtOTP2... |
I have created a yoga app on Android Studio. Can someone review the code to see if I have used the best practices of programming?
MainActivity:
package mo.youga;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Bu... |
I'm working on a proof of concept idea I want to use in a Brutalist styled web page.
This would involve having transparent image being placed randomly behind the content on load, I have this working with mostly vanilla JS, minus a few jQuery methods that I wasn't sure how I could translate back to vanilla. (I learned j... |
I have the below code which i'm working to copy(using rsync) the contents From remote host labserver01 and dumps those into the directory /var/log/infoSec/ on the base system from where scripts runs and this works correctly and sends e-mail to the recipients, However i'm also figuring out to include a way to send e-mai... |
Trying to applying what seen on What Is Dynamic Programming and How To Use It (here: https://www.youtube.com/watch?v=vYquumk4nWw )
Obviuously this is the final code, after removing the recursion.
I thought it was a good idea to memoize just the latest two values instead of the whole sequence.
I could replace the array ... |
I'm currently using a stored procedure(sproc) to export to Excel. The sproc is being passed two parameters for @month and @year. The parameters are then passed to a dynamic pivot table in order to display all the days of the month for the specified month and year.
It does currently work, however are there better ways I... |
I'm trying to build a simulation in R to model the effects of different parasite egg laying behaviors on how many offspring the parasite has, given a limited amount of resources. In brief, this simulation iterates through successive generations of the parasite and follows the number of parasites in each category of tra... |
I went through a series of lessons in data science using pandas and numpy.
I have attempted to replicate some of the more common algorithms based on maths forumlas and psuedocode, except for the ECDF method which was the first one in the course.
As far as i can tell they are correct and I have put some up against numpy... |
Overview
We are learning PHP OOP and decided to create a simple app with 3 database tables, one a basic users table, the other two containing information about the users' favorite food and favorite restaurant.
To help help others learn this and other best practices a bit easier, we welcome PRs, issues, and other contri... |
(Sorry this is a repeat post, I hadn't logged in on my initial question and am unable to respond)
I currently have a working code for a simple paint application but it is all in one file and very long. I'm unsure of how to break the code up into smaller pieces and create classes with them. I tried to research Java clas... |
I was reading the book Algortihms to Live By and was inspired by it to take a shot at simulating How to pair socks from a pile? (sans the efficiently part at the moment).
import random
from operator import add
def get_pair_of_socks(num_of_socks):
return random.sample(range(num_of_socks), num_of_socks)
def index... |
I've recently finished building a calculator in Python using Tkinter, and would appreciate any and all feedback on it. Please ignore the use of the eval function, I know this is advised against using but my teacher insists that we use it in our development.
I'd really like to condense and simplify my code for validati... |
I used to import all the actions in the container's argument which looks messy (I put a comment below where I do it in that way). I want to know if there is a better approach when using actions with react-redux. Should I use alias, and if I use alias is there any impact on the performance?
import React from 'react';
im... |
I'm a beginner programmer looking for a review of my simple war card game program I made. Each player gets a deck and you pull 1 card at a time and compare the 2. Highest value wins. Do that until the deck is gone and whoever has the most points wins. Any advice is appreciated! Thank you for your time looking at this!
... |
I am reading the "Learning Concurrent Programming in Scala" and there are exercises in the end of each chapter.
One of exercises is
Implement a parallel method which takes two computation blocks a and
b, and starts each of them in a new thread. The method must return a
tuple with the result values of both the comp... |
First: I'm not really a programmer. Thus, this application may be started in a bad way, but here is my question.
It's not a specific one because I have no real clue about how to improve my code. Let me know how I can recenter this question if needed.
Anyway, here is what I do and my issues:
First, you will see on the c... |
Lets say my folder structure looks like this
someproject/v5/.htaccess
someproject/5.0.1/lib.js
someproject/5.0.1/assets/img/png/anotherfolder/helloworld.png
someproject/5.0.2/lib.js
someproject/5.0.2/assets/img/png/anotherfolder/helloworld.png
When user enters url's like (and lets say I am the owner of google.com):
w... |
I am preparing for technical interview and I found this question on geeksforgeeks, but I did not understand their solution. So, I have written my own solution. I want to optimize this code.
#include <iostream>
#include <string>
bool isPalindrome(std::string& str)
{
for (int i = 0, j = str.length()-1; i<j; ++i, --j... |
There is a global exception handler in our WebAPI application that looks like the following:
public class ApiExceptionHandler : IExceptionHandler
{
public async Task HandleAsync(ExceptionHandlerContext context, CancellationToken cancellationToken)
{
var exceptionType = context.Exception.GetType();
... |
Here's an interesting article called "How to Remove Elements from a Sequence Container in C++". At some point, the author also explains how to remove duplicates from a container, but only with the very restrictive condition that those duplicates are adjacent. I've given a bit of thoughts on how to make a generic algori... |
I have programmed Conway's Game of Life in C++.
/*
Any live cell with fewer than two live neighbors dies, as if by under population.
Any live cell with two or three live neighbors lives on to the next generation.
Any live cell with more than three live neighbors dies, as if by overpopulation.
Any dead c... |
Could someone please review my code for performance(any other suggestions are welcome) which converts flat data list coming from database to a tree?
Interface for db entity class
public interface IDbEntityNode
{
int Id { get; set; }
int ParentId { get; set; }
string Data { get; set; }
}
Example of db E... |
My external drive that I use for Backup had some broken files. I feared that I'd lose some (or all) the data in there. So I wanted to copy each and every file to my hard disk.
I first tried using regular Windows methods (Copy, Xcopy). But, these methods took a lot of time and the commands would stop execution after hit... |
I am developing an application that must generate a random password for each new user in the system (initial password).
My idea is to use passwords of 16 characters long.
Would like to know if the code below is a secure way to generate passwords and if it can be improved. The system will be used by hundreds of thousand... |
Problem Statement
I am trying to find the intersection over union (IoU) metric for one to several rotated rectangles compared to many different rotated rectangles. Here are some images to help visualize this metric:
The second metric is quite close to the scenario I'm trying to calculate, the white area divided by t... |
Without changing the outputs or the inputs of the method, how would you make this code more readable ?
I am interested in any general improvement it can be made in terms of readability without WORSEN the time complexity.
Above all I'm interested of know if there is a way of doing all this steps in one line:
check if t... |
This code takes a list and a integer and duplicates every element in the list the specified number of times.
(define (super-duper source count)
(define (next-super source left)
(if (zero? left)
(super-duper (cdr source) count)
(cons (super-duper (c... |
I have a list of CSV files (all have the same fields), some of which are empty. My goal is to find the first nonempty file and use that as the "base" file for an aggregation. After finding the base file, the way I will consume the rest of the files changes, so I need to maintain the index of the file. Here is what I cu... |
A coding challenge that rotates an image 90 degrees counterclockwise. The image is represented as an array matrix. I believe the time complexity is O(n2), but I'd like to know for sure, as well as any other feedback.
def rotate_image(img):
rotated_image = [[] for x in range(len(img))]
for i in range(len(img)):
... |
You are given a number. You are given the opportunity to swap only once to produce the largest number.
My approach was to use buckets whose values were their indexes and their locations were their values.
I walked the array checking if the largest value was greater than the current value.
If the current value was ... |
In a Outlook VSTO Addin I needed to loop through a large pst file (e.g 30GB containing 50k+ mails). Following code block loop the pst file folder by folder recursively. It takes huge time (1hour+) to complete the loop especially when looping such large pst file for the first time.
The purpose of this code is to get th... |
This is a simple function that copies the content of one stream to another. My question is simple. I am currently, copying between the streams one byte at a time, but the streams are both Buffered. What are some ways to optimize it for speed? Any other advice would be appreciated as well.
private boolean copyToStream(B... |
I'm working on a legacy C++ project, which is using GLib for its Main Event Loop. This has caused a lot of ugliness because it mixes C++ and C paradigms (no C++ wrapper for GLib had been used).
Anyway, I'd like to generalize some classes that internally use the Asynchronous Queue provided by GLib.
This is what I've don... |
I have an inherited code base that I am looking to improve. Below is a "variable wrapper" template class and #defines that i would like to replace with a template only solution, or redesign completely with something else. I have not been able to come up with any solution that would not have to leverage macros or are w... |
I'm creating a text-based adventure game using PyGame. I plan on also implementing kind of a Pokemon/Final Fantasy style combat system that works with menus instead of commands, but I haven't started that yet.
The pygame_functions module can be found here; I didn't make it.
Issues I know are present:
I'd like to load... |
Given is a list with (possibly) non-unique elements.
My goal is to split this list into multiple lists, in sum containing the same elements, but separated in a way that no sublist contains each element value more than once.
A few examples to show the supposed result:
[1, 2, 2] -> [[1, 2], [2]]
[1, 2, 2, 3, 3, 4, 4, 4]... |
I've implemented an algorithm found in a book. It adds 2 positive integers of equal size. How can it be improved? It is assumed that inputted data is always positive integers with an equal number of digits.
EDIT
As there are lots of comments regarding the question, I would like to rephrase it. This program tries (yes i... |
I'm putting together a video website for our company, with a working accordion. It works, but it using the same class name for each section creates issues with the expanding and collapsing. I found a solution, but I'm going to need 13 similar sections for 13 lessons, and having to recreate the same code repeatedly in... |
I've written this rather cumbersome PowerShell script that facilitates a business use case. Because I built it off a PowerShell auditing tool I made, it was formatted differently.
What I'd like to do, in the module that launches the WPF window, is have it launch a runspace for the portion that verifies whether the mail... |
Here is the case of ugly condition for the "if":
private void setRequirementAttributes(List<CarParams> carParamsList) {
Vehicle vehicle = this.getModel();
for (CarParams item : carParamsList) {
if(item.getInfo().getYear().equalsIgnoreCase(vehicle.getYear())
&& item.getInfo().getMark().equalsIg... |
I am writing a program in JavaScript to find all possible words given 7 letters. The words have to be 3 or more characters, and for right now I am limiting it to 7 characters long. The code below works, but takes forever to complete and I would like to speed it up. Would recursion help?
Thanks for any suggestions.
The ... |
This is my first attempt at a sizeable amount of code in Python and I've made an attempt to standardize a script into a library so that it can be reused.
However, scraper.scraper (as well as scraper.Scraper?) appears in Idle when you import the module.
Some constructive criticism on the code style/layout would be appre... |
I have been programming for a long time. Only recently have I decided to take a stab at Python (I should be working with C# as I am in school for it, but I don't care for Windows, long story).
I was on this site and it showed a source for a calculator. I took it, and put it in PyCharm and started to study. By the time ... |
I was in a code review today and someone said, "Why don't you do an enum on that?" I had started to, but conforming to a bunch of protocols seemed like a gigantic PITA and it seemed more error prone than just writing something simple, readable, and maintainable.
That said, I started to fiddle around with it this evenin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.