« first day (1820 days earlier)      last day (2494 days later) » 

00:00
RELOAD! There are 5265 unanswered questions (89.9899% answered)
0
Q: merge_sort and unit testing python

NinjaGI made a merge sort, and wanted to ask for code review. It passed all of the unit testing. The idea behind the classic Mergesort algorithm is to divide an array in half, sort each half, and merge the two halves into a single sorted list. Examples: merge_sort([2,7,5,9,8,9]) -> [2,5,7,8,9,9] me...

00:29
This question belongs on codereview.stackexchange.comjaco0646 6 secs ago
00:59
0
Q: Find the smallest positive integer that does not occur in a given sequence

Đỗ TiếnI am trying to solve this problem on Codility. Here is my code: def solution(array) min = array.min max = array.max return 1 if max < 0 return 1 if min < 0 && max > 1 hash = array.inject({}) do |hash, number| hash[number.to_s] = true hash end 1.upto(max) do |number| u...

01:12
If you have working code and are interested in having folks review it then you probably want codereview.stackexchange.com. Before you post a question though, be sure to read through their help center to make sure it is on-topic. Your question, as written, doesn't seem on topic here. — Retired Ninja 45 secs ago
0
Q: simon game made with ECMAScript html and css

kokokonoithe javascript - const simonHTML = { power : document.querySelector('.powerButton'), strictButton : document.getElementById('strict'), startButton : document.getElementById('start'), displayScore : document.getElementById('score'), colors : document.getElementsByClassName('color') } const ...

01:34
0
Q: Powershell:Is this the most efficient way of replacing values in a list?

bier hierThis is my first powershellscript ever so bear with me :) Trying to replace values in a sharepoint list from a csv file: Param( [Parameter(Mandatory=$true)][string] $csvFileName = $null, [Parameter(Mandatory=$true)][string] $sharePointWebUrl = $null ) $isError = $false cls $csvFile...

02:03
TTQW && Weekend
 
1 hour later…
03:28
If you have working code that you want peer reviewed, you should be asking at Code Review. This site is for problems related to non-working code or programming tools. Make sure you read the site guidelines (in their help center) before you post there. — Ken White 30 secs ago
0
Q: Xcode: Thread 1: EXC_BAD_ACCESS (code=1, address=0x0) when making adjacency graph

Josh GarzaI'm writing a program that reads a file consisting of courses and the pre-reqs for each course. I'm supposed to print an ordering in which you could take all of the listed courses so that you don't take any courses before you've taken all the required pre-req courses. To do this I made an adjacen...

0
Q: Linux filesystem abstraction

Felipe SiqueiraSo, recently I started to study about filesystems and I've been wondering about how I could write a class that represents a filesystem. After some research I came with the following Go struct type Filesystem struct { Name string Type string MountPoint stri...

0
Q: Code that handles n% of test cases but not all

PhrancisI've started noticing recently questions like this one or that one where the author states something like this: I am trying to solve this problem on Codility. I just got 66% for my score. My solution fails at the following cases... In fact it looks like a lot of them come from Codility user...

@KenWhite... how you added that link in comment (Code Review)? Every time I try to do that this happens -> <a href="www.google.com">Google</a> — Harshit Seksaria 1 min ago
03:52
0
Q: Shuntyard Javascript Calculator with unit tests

KagerjayI have been writing a javascript calculator for about a few weeks. It uses a shuntyard algorithm to do order of operations. Some unit tests I have not finished yet and there is some functionality missing (e.g. no display limitations, some display errors) but the core logic behaves as expected. M...

 
1 hour later…
05:11
Ive been looking at coding bootcamps but I am having trouble taking them seriously. Do they really help non-degree holding individuals find jobs?
05:22
-1
Q: Java / "for" loop not working BUT just on the first iteration, afterwards, it works fine

David VillagranI've created a switch inside a nested "for" loop within another for loop, with the purpose of storing information provided by the user inside a bidimensional String array. There are 4 questions that the user needs to answer in order for the program to store each one of those answers inside one o...

 
1 hour later…
0
Q: Creating Captcha in ColdFusion then showing image in Vue.js

James A MohlerI am trying to create a Captcha image on ColdFusion. ColdFusion will be producing REST services and hence will have to push the image via JSON. I want the image to be self contained, I don't want to expose any of the servers paths. So I am going to encode the image and push that via JSON. Last bu...

07:33
@EricWang The sources in codereview.appspot.com/5700081 are more fit for Go commands themselves... but was never completed. — VonC 56 secs ago
0
Q: F# Either computation expression with while loop

Carlos RodriguezI want to implement an Either computation expression in F#. The computation executes a function inside a while loop, and this function's return type is Result<int, string>. The function might return an Error<string> is some condition is met, and then the whole computation expression should be sto...

07:52
Two small of a question to demand a review post, but is anyone aware of a more idomatic way in rust to do:
.and_then(|output: Output| if output.status.success() { Some(output) } else { None })
Basically given an Option, make it None, given some condition
08:42
Welcome to Stack Overflow! It would be a good idea for you to check out the tour and well as the help center. This is a place to ask for help with a specific problem (not to paste over 400 lines of code and expect someone to teach you how to make it work with no previous coding experience). I'm not sure but perhaps "Code Review" would be a more appropriate spot. I am sure there are plenty of great tutorials online to get you started with VBA. Here's two: Excel VBA For Complete Beginners & HomeAndLearn.org Learning VBA. — ashleedawg 27 secs ago
09:05
This seems more like a code review question. I would suggest you post such questions to codereview.stackexchange.com instead of to Stack Overflow. — Robin Green 45 secs ago
09:39
0
Q: Implementation of MVC pattern for single and multiple objects

colastarI've implemented a student administration with MVC pattern (Tutorial: Link). I've decided to divid the students in "SingleStudentModel" and "MultipleStudentModel", but I'm not sure if that make sense in my case. In general, I'm not satisfied with my solution. Is it possible to handle single stude...

09:52
It's possible that simply by cleaning up the code you'll find the bug(s). So consider posting this to code review. — Cheers and hth. - Alf 30 secs ago
10:14
0
Q: Android get container width instead of display width

Emanuel GrafI want to display a story of variable length in a cardView. To make the content fit, I split the text after every 500 Chars and add it to another relativeLayout which is added to a HorizontalScrollView. But I must define a length of the relativeLayout, otherwise it is just a long one-liner in th...

Monking
possible answer invalidation by Jean-François Fabre on question by sek fook tan: codereview.stackexchange.com/posts/193067/revisions
11:23
0
Q: Comparing data in SQL using foreign keys

MAONThe following is given: CREATE TABLE City ( city_name varchar(255), country varchar(255), primary key (city_name) ); insert into City(city_name, country) values('London', 'England'); insert into City(city_name, country) values('Santiago', 'Chile'); insert into City(city_name, country) v...

11:36
@Cheersandhth.-Alf: Any question about non-working code or finding bugs is off-topic on Code Review, and usually closed quickly. — Martin R 9 secs ago
Monking
11:56
-2
Q: Matching prefix in Trie

ElectricI have constructed a trie and I want to perform some prefix matching out of it. In other words, based on the prefix, i want to get the output of the strings that matches the prefix in the Trie. I have the Trie code below but I'm having some difficulty with the prefix_search function. class Node:...

12:14
0
Q: Navbar menu with two differents formats/styles

PelayoI have a navbar menu with two styles: First one is a tranparent menu. I use it when the page charges. Second one is a scroll and responsive (not yet) menu. I use jquery to transform the first menu to the second one because they have two different fully styles, but I don't know if this will a...

@MartinR: A code review question would be about cleaning up the code. I see now that it's a requirement that the code works as intended. I wasn't aware of that: it's an inordinately limiting requirement. — Cheers and hth. - Alf just now
12:48
0
Q: Translate an integer in plain English with Haskell

Stéphane LaurentI've written up this function which converts an integer into its corresponding English word: > integer2word 21324 "twenty one thousand, three hundred and twenty four" However I get an error when the last digit of the integer is 0: > integer2word 20 "*** Exception: Prelude.!!: negative index ...

0
Q: multiplication of matrices using 2d-vectors

Zoya've been working on passing 2d vectors to a function i want to return the product of both vectors (src and src_trans) but my code is not working. this is compiling without any errors but is not showing any result(product) for the multiplication part. the error that it shows upon execution is: tha...

possible answer invalidation by Dzmitry Hubin on question by Dzmitry Hubin: codereview.stackexchange.com/posts/178633/revisions
 
1 hour later…
13:50
0
Q: How good is this cipher? (Python)

Tudor PopescuI made a cipher on python and I want to know how good it is, I calculated there are about 10^1025 possibilities for the key, is that any good? I can easily make it bigger. I mainly focused on the 'hard encoding' by the way. Here is the code

14:40
0
Q: SQL Server - Iterate, aggregate, and insert

eclecticistI'm trying to find an efficient way to aggregate data for reporting. Let's say I need to aggregate the following data in 5-second intervals: CREATE TABLE RawData ( Result FLOAT, CaptureTime DATETIME ); INSERT INTO RawData VALUES (2.3, '2018-04...

0
Q: Users adding eachother in Laravel

JaykI'm looking for a code review for the following system that I created. It allows a landlord, to add a tenant to start a tenancy. It has added, accept, reject, and prohibits a tenant from adding themselves. Tenants can't add landlords. First thing up is my controller The form is what is rendere...

This is a better fit for Code Review. — McGuireV10 11 secs ago
I'm voting to close this question as off-topic because it's asking for a code review — Mickael Maison 30 secs ago
 
1 hour later…
15:44
This question belongs to Code Review. — Harshit Seksaria 28 secs ago
16:01
I'm voting to close this question as off-topic because it belongs to the Code Review Stack Exchange network — Yassin Hajaj 43 secs ago
1
Q: How to avoid duplicated record in database relation

cojacI'm creating a database for store soccer historical data and I have some questions to ask about some tables relation that I implemented so far. First of all I need to explain how the data should be implemented. The historical dataset that I have is divided into different soccer seasons, a soccer...

 
1 hour later…
17:10
possible answer invalidation by cojac on question by cojac: codereview.stackexchange.com/posts/193151/revisions
17:53
-1
Q: Python percentage calculator by a beginner

BartI'm learning python for 2 months now and I'm working on a little exercise app calculating percentages. I'd like to ask for a code review and comments. I'd like to make sure I'm following the right habits from the beginning. Also, I'm struggling with restarting the program after finishing one tas...

a = b = c = 0: uncountable choices for x. If and when you want opinions on code working to your satisfaction, have a look at Code Review. — greybeard 48 secs ago
18:45
possible answer invalidation by Jamal on question by cojac: codereview.stackexchange.com/posts/193151/revisions
19:01
0
Q: XML Parser written in Java

Koray TugayAny review and comments welcome! (Attributes and CDATA not supported at the moment.) Yesterday I went to a job interview and I was asked how I would implement an XML parser. For a reason unknown to me I said I started by saying I would need the XSD and end up with talking about reflection. (Have...

19:35
-1
Q: Compile a Unix/Linux code on Ubuntu

JulienFor my studies I need to run a program called SDTrimSP, which simulates ion collisions in solids. The programers sent me the program but made clear that compiling was my problem. However I have little if any experience in programming, so I am unsure about the way to do that. I installed Ubuntu o...

19:47
The question seems to be: "Can you check this code?" Which is off-topic Its not even on-topic for Codereview SE. But if you have already found a specific error and want help with that, we are happy to help. — rollstuhlfahrer just now
20:09
0
Q: Simple HTML website with JavaScript navbar

Julian LachnietThe following code is a website with a nav-bar on it. It uses some simple JavaScript to make it work: index.html: <!DOCTYPE html> <html lang="en-US"> <head> <meta charset="UTF-8" /> <title>SigmaCubes - Home</title> <meta name="author" content="Julian Lachniet,Simon Kwilinski,Jacob Wysko" /

20:27
0
Q: Stack implementation with singly linked list

MAAThe following is my implementation of a stack using a linked list. class EmptyStackError(Exception): def __init__(self): super().__init__("Stack is empty: Invalid Operation!") class LinkedList: class _Node: def __init__(self, data, next_node=None): self.data...

20:44
0
Q: weather api showing up undefined javascript

CnevMy lat and lon do work because I print them, but all the main objects of the api like "weather" show up undefined. I'm still learning so anything will be appreciated. <!DOCTYPE html> <html> <head> <style> div{ width:500px; height:500px; } </style> </head> <body onLoad=geo()> <p id="loc"> <

21:01
0
Q: Calculate next position and velocity after "bounce"

geofflittleIntro and code I have the following function that calculate an objects "next" position and velocity (in 1 dimension) given a boundary [0, max]. public TwoVector<Double> getNextPositionAndVelocity(double position, double velocity, double max) { if (position + velocity < 0) { return T...

21:18
0
Q: Logs UI errors to a service provided in the configuration

Andreas Andreouimport uuid from 'uuid/v4'; import post from './post'; function requiredParam(param) { const requiredParamError = new Error(`Required parameter, "${param}" is missing.`); // preserve original stack trace if (typeof Error.captureStackTrace === 'function') { Error.captureStackTrace( ...

I see you've also posted this question to the code review site. That's probably the better forum for this question. — Andrew Shepherd 1 min ago
21:54
-1
Q: How Would I Run This

iRedHow would I run this script that I found on the Internet? Here is the code: $('.xss').parents().eq(1).find('a').eq(1).click();$('[data-action=retweet]').click();alert('XSS in Tweetdeck')

0
Q: Creating a logger in the top level of my react app and then using it in other components as I need it

Andreas Andreou//App.jsx import React, { Component } from 'react'; import { initialiseLogger } from './logger'; class App extends Component { constructor(props) { super(props); initialiseLogger(props.environment); } render() { return ( <Component /> ); } } export default App; T...

22:44
-1
Q: C++ Creating a Ordered LinkedList

Nom OnTheCookieSo I am attempting to create an ordered linked list to play within an array to store library books. However, I have been stuck at attempting to create the Ordered Linked list for hours. I have managed to create the code for Linked List, however, I have no idea how to go about the creation of an O...

23:18
0
Q: Primary number, my algorithm is too slow

jackfieldI coded a algorithm which shows primary numbers from the range provided by user. He provide also on start numbers of cases. Example: INPUT 2 1 10 1 5 OUTPUT 2 3 5 7 2 3 5 t - number of cases, n and m is the range (t<=10) m and n (1 <= m <= n <= 1000000000, n-m<=100000) separated by a space A...

23:35
0
Q: Emails not being sent via PHPMailer

acekidI took over the web development for a company and they've got a feedback form on a couple pages (colorado, prescott, flagstaff and wyoming) that submits form info to an email as a spam filter using PHPmailer. However, they're not receiving emails the way they hoped. I can get emails through all a...


« first day (1820 days earlier)      last day (2494 days later) »